Jump to content
thirty bees forum

Rhapsody

Members
  • Posts

    67
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Rhapsody

  1. @datakick An update on the GoDaddy email configuration. It turns out the additional fields are not needed in the "Mail via PHPmailer" module. I did some more testing and found that the SMTP server must be set to the actual mail server on the "Mail via PHPmailer" module or there is an SSL certifcate validation issue. The "Mail via Swiftmailer" module worked with local host, probably because the SSL certificate validation was not enforced. I'm not sure how I can remove the enhancement request from Github. Possibly just a follow on comment that the additional fields are not required. The option to use PHP Mail() for testing should remain.
  2. @datakick - Done! Advanced Options Fields - https://github.com/thirtybees/tbphpmailer/issues/3 Option to use PHP Mail() for testing - https://github.com/thirtybees/tbphpmailer/issues/4
  3. Request Advanced Options Fields for Mail via PHPMailer Module I have one of my installations hosted on a Linux server with cPanel on GoDaddy. Don't ever use GoDaddy! The Outgoing SMTP requirements are almost impossible to set. I have finally figured out a working configuration for sending email in WordPress, and as a result am requesting some "advanced" options be added to the Mail via PHPMailer module. The current module will not support SMTP for GoDaddy, unless additional fields are included. Advanced Options fields requested: SMTPAutoTLS (boolean) - default to true, needs to be false for GoDaddy SMTPAuth (boolean) - default to true, needs to be false for GoDaddy Additionally it is requested that the option to use PHP's mail() function, be available as a setup option, similar to the Mail via Swiftmail module. This makes it easier to troubleshoot mail settings. For supporting information, the following is what I was able to get working in the WordPress wp_config file with the defined constants loaded via PHP code in the separate file below it. // SMTP Authentication replaces PHP mail define( 'SMTP_USER', 'authenticated_email_account@domain.com' ); // Username to use for SMTP authentication define( 'SMTP_PASS', 'mypassword' ); // Password to use for SMTP authentication define( 'SMTP_FROM', 'your_desired_email@domain.com' ); // SMTP From email address define( 'SMTP_NAME', 'John Smith' ); // SMTP From name define( 'SMTP_HOST', 'localhost'); //'localhost' for GoDaddy Linux cPanel hosting define( 'SMTP_PORT', '25' ); // 25 for GoDaddy SMTP port number - 465 or 587 will not work on GoDaddy define( 'SMTP_AUTOTLS', false ); // false required for GoDaddy define( 'SMTP_SECURE', '' ); // blank for GoDaddy Encryption system to use - ssl or tls will not work on Godaddy define( 'SMTP_AUTH', false ); // false for GoDaddy Use SMTP authentication (true|false) - GoDaddy requires false where most everywhere else true define( 'SMTP_DEBUG', 0 ); // for debugging purposes only set to 1 or 2 This is the PHP code in WordPress that sets up the SMTP // SMTP Authentication to replace PHP Mailer add_action( 'phpmailer_init', 'send_smtp_email' ); function send_smtp_email( $phpmailer ) { $phpmailer->isSMTP(); $phpmailer->Host = SMTP_HOST; $phpmailer->SMTPAuth = SMTP_AUTH; $phpmailer->Port = SMTP_PORT; $phpmailer->Username = SMTP_USER; $phpmailer->Password = SMTP_PASS; $phpmailer->SMTPSecure = SMTP_SECURE; $phpmailer->SMTPAutoTLS = SMTP_AUTOTLS; // required for GoDaddy $phpmailer->From = SMTP_FROM; $phpmailer->FromName = SMTP_NAME; } // end function send_smtp_email( $phpmailer )
  4. Thanks to @datakick the answer is fairly simple. The customization field id is textField0 which was determined using the Chrome Inspect option. The url for the product page has ?subdmn=desired_subdomain appended at the end where desired_subdomain is the text to be populated in the customized field box. I used a Google search to get the correct Javascript syntax and inserted the script below on the Custom Code page in the section labeled Add extra JavaScript to your pages. window.onload = function(){ var subdmn = (new URLSearchParams(window.location.search)).get("subdmn"); document.getElementById("textField0").value = subdmn; }; This concept can be used for virtually any shop and product with customized fields. Just change textField0 to whatever the ID is that matches the customized field you want to populate
  5. Thanks @datakick. I'm comfortable with PHP but a newbie with Javascript, but I think I can figure it out.
  6. I run a WordPress website subscription service that is ordered through a Thirty Bees shop. An email is sent 5 days before the end of the subscription reminding a customer to renew. The email contains a direct link to the Thirty Bees product page for subscription renewal. The subscription renewal in the Thirty Bees product page requires a customization field be filled in to enable the add to cart button. I was wondering if it was possible to read the value of the customization field if it was passed in the url as a direct link to the product page in the shop, with the associated customization field filled in using the data in the url. In an ideal world it would actually take the customer to a checkout page with the customization field populated. The next best alternative would just open the product page with the customization field filled in already Example - This is the product page url that opens the page with the single customization field: https://crew-mgr.com/shop/home/3-annual-subscription-renewal.html What I'd like to do: URL formed with customization field data: https://crew-mgr.com/shop/home/3-annual-subscription-renewal.html?subdomain=subdomainnamehere I can easily form the custom URL in the reminder email that gets sent to the customer. On the Thirty Bees side I would like to know if there is a module or hook that would allow the url to be parsed for the custom field and the data to be automatically typed in the custom field on the product page. In WordPress I have a function to parse a URL whenever I want to grab parameters. This could be easily modified with the customized field and used in Thirty Bees. What I don't know is how this function would get triggered, and how to populate the custom field. The URL parse function I use is below: function cm_parseURL() { (isset($_GET['yr'])) ? $parsed_array['yr'] = $_GET['yr'] : $parsed_array['yr'] = NULL; (isset($_GET['canx']) && $_GET['canx'] == "true") ? $parsed_array['canx'] = TRUE : $parsed_array['canx'] = FALSE; (isset($_GET['data']) && $_GET['data'] == "true") ? $parsed_array['data'] = TRUE : $parsed_array['data'] = FALSE; (isset($_GET['tag_ids'])) ? $parsed_array['tag_ids'] = explode( ',', $_GET['tag_ids'] ) : $parsed_array['tag_ids'] = FALSE; // array of tag ids (isset($_GET['cat_ids'])) ? $parsed_array['cat_ids'] = explode( ',', $_GET['cat_ids'] ) : $parsed_array['cat_ids'] = FALSE; // array of cat ids (isset($_GET['expand']) && $_GET['expand'] == "true") ? $parsed_array['expand'] = TRUE : $parsed_array['expand'] = FALSE; (isset($_GET['from'])) ? $parsed_array['from'] = $_GET['from'] : $parsed_array['from'] = FALSE; // user id (isset($_GET['to'])) ? $parsed_array['to'] = $_GET['to'] : $parsed_array['to'] = FALSE; // ai1ec event id (isset($_GET['start'])) ? $parsed_array['start'] = $_GET['start'] : $parsed_array['start'] = FALSE; // ai1ec start unix time (isset($_GET['exp'])) ? $parsed_array['exp'] = TRUE : $parsed_array['exp'] = FALSE; // expanded date range passed from skipper clicking send email on event return $parsed_array; } // end function cm_parseURL() to get current url and parameters to parse for use in setting query
  7. @wakabayashi - I just discovered this post as I recently replaced CAPTCH on my WordPress sites with Turnstile and was going to post here suggesting a module. This is perfect! Thanks very much for creating it. What is needed to make this available as a supported module with the other Thirty Bees modules? I believe this is a real benefit for the Thirty Bees community.
  8. I just updated two other installations with latest bleeding edge and see that both comments above are addressed. SMTP settings transferred, and the test email is back. Great work datakick!
  9. I just saw this after installing the Bleeding Edge update. Scratched my head on what broke the email until I figured it out. Suggestion and comment: Suggestion: If SMTP parameters were previously saved using Swiftmailer in Core Code, migrate them over to the tbswiftmail module settings. I had to search my files to figure out what I had set the SMTP outgoing account as. Comment: The Test Email that used to appear at the bottom of the Email setup page does not appear any longer when the tbswiftmail module is installed with Bleeding Edge. This should be restored.
  10. In the advanced parameters you probably need to set your own SMTP parameters for the domain that has the email address you want to use. Under Adavanced Parameters, Email - you'll choose the option to use your own SMTP parameters, then scroll down and enter the settings. There is a test section there so once you save the parameters you may try it to make sure they are correct.
  11. I have a small js modification stored in the core code root/js/tools.js path. I was wondering if an override could be applied to js files similar to the class and controller files so that I don't need to update the file each time the shop is updated. Override JS questions: 1. Can JS files use an overrride? 2. If so, can just the changed function be added in the override, or does an entire file required to duplicate and override the original? 3. Where should the override file be saved? (e.g. in root/override/js/tools.js or root/themes/mytheme/js/tools.js The tools.js modification starts on line 375 and is comments out as follows: function checkCustomizations() { var pattern = new RegExp(' ?filled ?'); if (typeof customizationFields != 'undefined') { for (var i = 0; i < customizationFields.length; i++) { /* If the field is required and empty then we abort */ /**** line below replaced for removing save if (parseInt(customizationFields[i][1]) == 1 && ($('#' + customizationFields[i][0]).html() == '' || $('#' + customizationFields[i][0]).text() != $('#' + customizationFields[i][0]).val()) && !pattern.test($('#' + customizationFields[i][0]).attr('class'))) { ****/ if (parseInt(customizationFields[i][1]) == 1 && ($('#' + customizationFields[i][0]).val() == '')) { return false; } } } return true; }
  12. Duh! It's because I made them "Virtual Products" which turns off the shipping tab. Problem solved.
  13. I have a number of shops running TB 1.2 and one of them is not displaying "Shipping" on the left menu when a product in the catalog is opened. Other shops display the Shipping tab between Associations and Combinations. When I use the Chrome inspect option the tab is there but has the style="display: none"; so something must be disabling it. The html displayed in Chrome is pasted below. I'm sure there must be a setting somewhere that I clicked to disable this, but can't find it. Does anyone have an idea how to reenable Shipping on the product tab in the BO? <a class="list-group-item " id="link-Shipping" href="index.php?controller=AdminProducts&token=xxxxxxxxxxxxxxx&id_product=1&action=Shipping&updateproduct" style="display: none;">Shipping</a>
  14. @lesley - a very good post on potential architecture update. I've been using WordPress extensively too and offer another suggestion. WordPress has tables that may be used to store extra fields. As an example for users (e.g. customers) there is a table wp_usermeta structured with the fields user_id, meta_key - varchar (255), and meta_value - longtext. When adding custom user fields, the data is stored in this table along with many core defined user fields. When adding custom user fields there is no need to add columns to a table. WordPress has built in functions to retrieve and store data so it is properly escaped and safe . There are similar tables for posts & pages (analogous to products). An approach like this might have less impact on the existing core. Functions could be added to extend the existing architecture.
  15. Understood. Most of the refunds we process are for a single item, not the entire order. The ability to refund a single line item (or adjust the quantity for multiple of a single item) is what needs to be restored to as was previously available. An alternate method might be to have a field to list amount of partial refund with a text field to describe the purpose of the refund. Coupling a refund to the products and quantities is preferred.
  16. +1 on the ability to provide a PayPal refund directly from the shop. This was a feature previously possible in Prestashop 1.5.6 that was lost moving forward.
  17. A follow up on this original post. My WordPress multisite installations were performing really slow at times. I logged in to cPanel and saw CPU usage hovering at 99%. It turns out there were targeted login attempts at the WordPress login wp-login.php with random user names and passwords. Banning an IP worked for a little while, then the attacks started again from a different IP. I ended up installing the All in One WP Security & Firewall plugin. This plugin provides various options to customize the .htaccess file, including the 6G firewall rules mentioned in the original post. Since it was installed, all has worked fine and I can see in logs where the plugin shut down the persistent login attempts. It is setup so that after a set number of failed attempts, the request is redirected to 127.0.0.1 to take the load off the site. This got me wondering - Is there are similar set of rules that might be applied to the Thirty Bees shop login? I don't know if the shop install I have running on the same domain as the WordPress multisite install has been subject to the same type of attacks, but would feel better if I knew this protection existed.
  18. From the other post I referenced regarding the number of options that generates combinations: Product has 7 options the customer must choose The first 6 options have a unique attribute that are assigned the attribute type "dropdown list", Each dropdown list is assigned with 4 options to choose. The first option (default) "Select a Class" has a stock level of 0 making it unavailable to add to cart unless an option is selected The last dropdown forces the customer to acknowledge a liability waiver with the default "Please acknowledge" having a stock level of 0 making it unavailable to add to cart until "I agree" is selected
  19. Improve responsiveness when a product with multiple combinations is created. A full explanation is provided on this post. Performance is impacted two ways: Back Office: Loading a product with many combinations will time out and requires a 3rd party module to configure the combinations / price & stock Front Office: Page load time for a product with many combinations is way too long. This may require a change on how combinations and prices are generated. Perhaps offer an option to configure a combinations and the associated price to be calculated so those options that impact price are stored, while those that only change the product with no price impact only need to be saved with the order. The current method that generates and saves all possible combinations in the tables is not efficient. I know this isn't so simple because of the impact on stock management. There has to be a better way than how it is currently done. The error displayed: (timeout)A server error occurred while loading the tabs: some tabs could not be loaded.Please try again by refreshing the page.If you are still encountering this problem, please check your server logs or contact your hosting provider for assistance.
  20. Problem solved! It is something with the PHP mailer. I have changed outgoing mail to use SMTP and the problem is solved. I can't explain why test messages were sent ok using the PHP mailer but actual shop messages are not. I have been using the PHP mailer successfully up until now. ps - a big thank you and Happy New Year to all who provided troubleshooting suggestions.
  21. Further troubleshooting I just had a customer report they can't reset their password because when they click the retrieve password button the following error is displayed: There is 1 error An error occurred while sending the email. It looks like I need to find out what is happening with all outgoing emails. The test messages using PHP mailer works fine.
  22. Verified they are in the directories: modules/mailalerts/mails/en themes/mytheme/modules/mailalerts/mails/en yes - confirmed that new order is checked Thanks for this tip. I will try this and report back later.
  23. I am using the Thirty Bees PayPal 5.4.3 module. I assume it does since it works on the other shop that shows the same hook.
  24. @yaniv14 - It is the only module with the actionValidateOrder hook. I also checked the other shop that is working with only the same single hook.
  25. I also tried going back to the community theme default rather than my modded community theme default to place an order - still no emails.
×
×
  • Create New...