Jump to content

jasehead

Member
  • Content Count

    156
  • Joined

  • Last visited

Everything posted by jasehead

  1. I think you meant: * { white-space:normal!important; } So I tried this before the </head> tag in main.php, which did the trick: <style>.humm-main { white-space:normal!important; }</style> Thanks for your help! Problem solved.
  2. In Safari developer mode. I start with the category web page by selecting the widget fortnightly payments text and right click to inspect element. I have worked through different parts of the widget, and only the <span class="humm-main"> has any css that changes to how I want it to look, and that is by switching off "white-space:nowrap" for .humm-price-info-widget .humm-description .humm-main I have tried some parent nodes but I can't change the text wrapping of the widget. Not seeing anything else that would change the test wrapping. I am testing a category page with only one item though. This is the injected CSS if you want to search for nowrap - seems to support "humm-main" as the class responsible: .humm-more-info-widget{all:unset;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #a9a9a9;font-size:16px;color:#333;padding:8px 24px;overflow:hidden;text-decoration:none;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:proxima-nova,sans-serif;text-align:center;background-color:#f8faf7;position:relative}.humm-more-info-widget:hover{color:#333!important}.humm-more-info-widget .humm-inside{-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%;max-width:900px;margin-left:auto;margin-right:auto}.humm-more-info-widget .humm-inside,.humm-more-info-widget .humm-inside .humm-main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.humm-more-info-widget .humm-inside .humm-main{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.humm-more-info-widget .humm-inside .humm-main .humm-text-area{all:unset}.humm-more-info-widget .humm-inside .humm-main .humm-text-area .humm-title{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;font-size:35px;margin:26px 10px 26px 0;line-height:120%}.humm-more-info-widget .humm-inside .humm-main .humm-text-area .humm-title .humm-strong{font-weight:900}.humm-more-info-widget .humm-inside .humm-main .humm-text-area .humm-tandc{all:unset;display:block;text-align:center;font-size:10px;margin-top:-6px}.humm-more-info-widget .humm-inside .humm-logo{all:unset;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.humm-more-info-widget .humm-inside .humm-logo img{all:unset!important;height:85px!important}.humm-more-info-large-slices .humm-inside{padding-right:100px}.humm-more-info-large-slices .humm-inside img.humm-elephant{all:unset;height:160px!important;width:273px!important;margin-top:-8px;margin-bottom:-8px}.humm-more-info-large-slices .humm-inside .humm-logo{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.humm-more-info-large-slices .humm-inside .humm-logo img{all:unset;position:absolute!important;right:10px!important;bottom:10px!important;height:65px!important}@media screen and (max-width:665px){.humm-more-info-large-slices .humm-inside{padding-right:30px}.humm-more-info-large-slices .humm-inside .humm-main img.humm-elephant{margin-left:-24px!important;margin-right:-24px!important}.humm-more-info-large-slices .humm-inside .humm-main .humm-text-area .humm-title{font-size:30px}.humm-more-info-large-slices .humm-inside .humm-logo img{height:40px!important}.humm-more-info-small .humm-inside .humm-main .humm-text-area .humm-title{font-size:25px}}@media screen and (max-width:500px){.humm-more-info-large .humm-inside .humm-main .humm-text-area .humm-title{font-size:28px}.humm-more-info-large .humm-inside .humm-logo img{margin-left:-20px!important;height:70px!important}.humm-more-info-large-slices .humm-inside .humm-main{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.humm-more-info-large-slices .humm-inside .humm-main img.humm-elephant{margin-left:auto!important;margin-right:auto!important}.humm-more-info-large-slices .humm-inside .humm-main .humm-text-area .humm-title{margin-top:10px;margin-bottom:32px;font-size:35px}.humm-more-info-large-slices .humm-inside .humm-logo img{height:40px!important}}.humm-more-info-small .humm-inside{max-width:1200px;padding-right:60px}.humm-more-info-small .humm-inside .humm-main .humm-text-area .humm-title{margin:0}.humm-more-info-small .humm-inside .humm-main .humm-text-area .humm-title>div{display:inline!important}.humm-more-info-small .humm-inside .humm-main .humm-text-area .humm-title .humm-strong{font-weight:900}.humm-more-info-small .humm-inside .humm-main .humm-text-area .humm-tandc{text-align:center;font-size:10px;margin-top:0}.humm-more-info-small .humm-inside .humm-logo{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;height:50px!important;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.humm-more-info-small .humm-inside .humm-logo img{height:50px!important;position:absolute!important;right:10px!important}.humm-more-info-mini{width:auto;max-width:430px;margin-left:auto;margin-right:auto}.humm-more-info-mini img{height:90px!important;width:100%!important}.humm-price-info-widget{all:initial;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:5px 0;font-family:proxima-nova,sans-serif;line-height:20px;color:#3d4246!important;text-decoration:none!important;border-bottom:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;overflow:hidden}.humm-price-info-widget img.humm-widget-logo{all:unset;display:inline-block;margin-right:8px;height:15px!important;float:none!important;width:auto;vertical-align:baseline}.humm-price-info-widget .humm-description{display:inline-block;font-size:16px;font-weight:300;vertical-align:baseline}.humm-price-info-widget .humm-description .humm-main{margin-right:6px;white-space:nowrap}.humm-price-info-widget .humm-description .humm-main .humm-price{font-weight:600;font-size:16px!important;display:inline-block;vertical-align:baseline}.humm-price-info-widget .humm-description .humm-more-info{display:inline-block;margin-top:-3px;text-decoration:underline;font-size:.7em;vertical-align:middle;white-space:nowrap;line-height:1.23}.remodal-close{color:#666}.remodal-close:hover{color:#333}#humm-banner-top,#humm-more-info-general{display:flex;flex-direction:row;justify-content:space-around;align-items:stretch;border:1px solid #a9a9a9;font-size:16px;background:#fff;color:#333;padding:12px;overflow:hidden;text-decoration:none;box-sizing:border-box}#humm-banner-top .logo,#humm-more-info-general .logo{display:flex;flex:1 0 280px;flex-direction:column;align-items:center;justify-content:center;margin:0 auto;border-right:1px solid #333}#humm-banner-top .logo img,#humm-more-info-general .logo img{max-width:180px}#humm-banner-top .title,#humm-more-info-general .title{display:flex;flex:2 1 auto;font-family:proxima-nova,sans-serif;font-weight:700;justify-content:center;flex-wrap:wrap;align-items:center;text-align:center;margin:0 0 0 20px;font-size:1.56em;line-height:135%}#humm-banner-top .title div,#humm-more-info-general .title div{display:inline-block;vertical-align:middle}#humm-banner-top .title #narrow-screen,#humm-more-info-general .title #narrow-screen{display:none}#humm-banner-top .title .light,#humm-more-info-general .title .light{font-family:proxima-nova,sans-serif}#humm-banner-top .orange-area,#humm-more-info-general .orange-area{display:flex;flex:1 0 256px;flex-direction:column;align-items:center;justify-content:center;width:176px;margin:0 auto}#humm-banner-top{max-width:1147px;margin-left:auto;margin-right:auto}#humm-banner-top .logo{flex:1 1 250px}#humm-banner-top .logo img{max-width:160px}#humm-banner-top .orange-area{flex:1 1 200px;width:176px}@media screen and (max-width:1100px){#humm-banner-top{font-size:12px}#humm-banner-top .orange-area{flex:1 1 200px;width:176px}}@media screen and (max-width:760px){#humm-banner-top .logo{flex:1 1 150px}#humm-banner-top .logo img{max-width:110px;margin-right:12px}#humm-banner-top .orange-area{display:none}}@media screen and (max-width:625px){#humm-banner-top{font-size:10.5px}#humm-banner-top .title{margin-left:8px}}@media screen and (min-width:596px)and (max-width:1196px){#humm-more-info-general{padding:32px}#humm-more-info-general .logo{width:50%;flex:1 1 auto}#humm-more-info-general .logo img{max-width:350px;margin-right:32px}#humm-more-info-general .placeholder{width:8%;flex:1 1 auto}#humm-more-info-general .title{display:block;width:42%;flex:1 1 auto;margin-left:0;text-align:left;font-size:30px}#humm-more-info-general .title div{display:block;white-space:nowrap}#humm-more-info-general .title #narrow-screen{display:block;margin-top:.5em}#humm-more-info-general #wide-screen{display:none}}@media screen and (max-width:595px){#humm-more-info-general{padding:32px;flex-direction:column;text-align:center;max-width:595px;min-width:300px;margin-left:auto;margin-right:auto}#humm-more-info-general #wide-screen{display:none}#humm-more-info-general #narrow-screen{display:block!important}#humm-more-info-general .logo{flex:0 0 auto;width:100%;padding:30px 0 50px;border-right:none;border-bottom:1px solid #333}#humm-more-info-general .logo img{width:90%;max-width:390px}#humm-more-info-general .title{display:block;font-size:32px;margin:3rem -15px 0}#humm-more-info-general .title div{display:block;margin:0 auto}#humm-more-info-general .title #narrow-screen{margin-top:1em;margin-bottom:.65em}}.more-info-btn{font-size:16px;font-family:proxima-nova,sans-serif;font-weight:700;color:#fff;background:#ff6c00;padding:0 2em;border-radius:15px;line-height:225%;display:inline-block;overflow:hidden;vertical-align:bottom}.remodal{background:transparent;padding:0;max-width:780px}#humm-modal-iframe,#humm-price-info-modal,#humm-price-info-more-modal{width:100%;height:500px;max-height:84vh;border:none}@media(max-width:500px){#humm-modal-iframe,#humm-price-info-modal,#humm-price-info-more-modal{height:84vh}}#humm-more-info-modal{width:100%;height:760px;max-height:84vh;border:none}@media(max-width:500px){#humm-more-info-modal{height:84vh}}a[data-remodal-target]{cursor:pointer}.humm-nowrap,.nowrap{white-space:nowrap}.humm-inline-block,.inline-block{display:inline-block}.flex{display:-webkit-box;display:-ms-flexbox;display:flex} The style sheet gets injected into the <head> before the meta classes.
  3. I guess I could try something like: <script> function wrapFunction() { var x = document.getElementsByClassName("humm-main"); var i; for (i = 0; i < x.length; i++) { x[i].style.white-space = "normal"; } } </script> But where, how and when? The widget needs to be injected and the page rendered first, right? Unless the parent class white-space can be set to "normal" to prevent the child class from being changed to "nowrap".
  4. In the category list view, this is the php code: <h3> {if $product.ctrl_sale}<span class="old_price">{$product.price}</span> <span class="sale_price">{$product.sale_price}</span> {else} {$product.price} {/if} </h3> <!-- START oxipay --> {if {$product.price|substr:1} >= 50 && $product.available > 0 && $product.ctrl_stock && ((strpos({$product.name|lower|replace:'-':''}, 'preorder') === false) && (isset($product.preorder_avail_date) && !is_null($product.preorder_avail_date) && $product.preorder_avail_date != "" && strtotime($product.preorder_avail_date) < time()))} {if $product.ctrl_sale} <script id="oxipay-price-info" src="https://widgets.oxipay.com.au/content/scripts/payments.js?productPrice={$product.sale_price|regex_replace:'/[^0-9.]+/':''}"></script> {else} <script id="oxipay-price-info" src="https://widgets.oxipay.com.au/content/scripts/payments.js?productPrice={$product.price|regex_replace:'/[^0-9.]+/':''}"></script> {/if} {/if} <!-- END oxipay --> {if $product.available <= 0} <div class="row collapse"> Which becomes source HTML: <h3> $119.95 </h3> <!-- START oxipay --> <script id="oxipay-price-info" src="https://widgets.oxipay.com.au/content/scripts/payments.js?productPrice=119.95"></script> <!-- END oxipay --> <div class="row collapse"> Which becomes the generated HTML: <h3> $119.95 </h3> <!-- START oxipay --> <script id="oxipay-price-info" src="https://widgets.oxipay.com.au/content/scripts/payments.js?productPrice=119.95"></script> <a class="humm-price-info-widget" data-remodal-target="humm-price-info-modal"> <div><img alt="Humm" class="humm-widget-logo" src="https://widgets.oxipay.com.au/content/images/logo-orange.svg"></div> <span class="humm-description"> <span class="humm-main">with 5 fortnightly payments of <span class="humm-price">$23.99</span></span> <span class="humm-more-info">more info</span> </span> </a> <!-- END oxipay --> <div class="row collapse"> By changing "white-space:nowrap" to normal for ".humm-price-info-widget .humm-description .humm-main" it should allow the widget to wrap to the Foundation column div and resize with the browser. I'm just having trouble finding how and when to modify the class style. There will be similar code in the product page.
  5. I use a gateway plugin for pay by instalment (Oxipay, now humm). Part of this service includes a javascript widget that shows the pay by instalment amount. However, because of recent changes with the service provider, there have been some changes in the injected code. My main issue is that the text explaining the pay-by-instalment amount is now wider than the div for the product price and it won't wrap. The CSS for the span is set to "white-space:nowrap". Is there some way that I can take control of this javascript injected style? There are no elements identified by ID, only by class. And in the Category page in CubeCart (content.category.php), the widget is between $product.price and $product.available, just after </h3> - so the injected code will repeat for each product listed in the category page.
  6. What does CubeCart do with an image when one is uploaded in the process of creating a new product? How many variations are created? Is the original image used in the live store? If an original image is 300dpi, then are any images in the live store 300dpi as well or does that change, and does it matter?
  7. Turned out the problem was a Safari extension. When turned off, the CubeCart modals worked OK. However, that particular extension wasn't a problem prior to upgrading the OS + Browser.
  8. First thing I did was check error logs for SQL errors, but nothing found. I agree that a mod_security rule update was probably the issue - this has been a problem in the past with my hyper-vigilant web host. I did some testing today and it seems to have been remedied.
  9. It isn't a bug in 6.1.14 either. These products were created with 6.1.14 within the last few months (and updated since then with no problem) - only in the last week or so has there been any issue, which is why I think it's due to some background server update. Upgrading cubecart is not an option because that would cause a major disruption - not looking to spend weeks fixing all the new problems from an upgrade until well after Christmas. How can I capture the SQL that is generated when a product is updated so I can show this to my webhost support?
  10. This is a recent problem, so I expect it is from some background server update rather than CubeCart. I'm running CCv6.1.14 because it's been stable and upgrades are a major disruption - so no recent changes at my end. The problem is that if the product contains CASE in the product title (pencil case, glasses case) then I can not update the product - it just defaults back to the retail storefront (probably caught as a 403 or 404 error by .htaccess and redirected). The only workaround is to make the item one word, eg. pencilcase, which is not ideal. What I want to be able to do is either: use some mod to make cubecart more robust by making sure the string is being treated as just a string, and not containing SQL commands, or capture the SQL that is generated when a product is updated so I can show this to my webhost support Any help?
  11. Just a heads up that Apple's sensitivity about blocking popups in Safari seems to have rendered any "delete" modal dialogue boxes in CubeCart useless. In 6.1.14, clicking the delete icon on a customer address or credit card details should show a modal that asks for an OK to confirm the deletion. A recent upgrade to MacOS Mojave 10.14 and Safari 12.0 has seen the behaviour change to no modal box displayed and the page hangs. It is possible to reload the page. A workaround is to copy the link from the delete icon, and paste this into the address bar to activate (skipping the modal). Or just use another browser. I have not found any settings in the Safari 12.0 browser that will allow CubeCart modals to display correctly (content blockers off, popups allow). If the modal popup method hasn't changed in later versions of CubeCart (eg. 6.2.2) then other Mojave+Safari users may find the same problem.
  12. Is there a way to get CubeCart to add the correct customer_id number to the CubeCart_newsletter_subscriber table rather than just a zero? Get signup during checkout to use the Register process rather than the newsletter subscription box process (if that's the problem)? If the customer_id is zero then, instead of matching the customer_id, fall back to matching the email address instead and getting title, first name and last name that way (eg. for mailing list export)? Verify subscribers by email address and update any with a customer_id of zero to their actual customer_id?
  13. The missing first name/last name issue happens when a guest agrees to create an account during checkout (in 6.1.14 anyway). The customer is being added to the CubeCart_newsletter_subscriber table with a customer_id of zero, which is the same as if they were signing up just using their email in the subscription box. So is the signup at checkout using the wrong process (basic newsletter signup instead of register signup)? Or maybe executing too soon, before the new customer has been signed in properly?
  14. I think that exploring the plugin in more depth is probably up to the plugin developer. Your first suggestion allowed the plugin to function without blocking the payment gateway - that's a huge improvement. There is still the CubeCart issue of first name and surname not making it to the CubeCart mailing list for new customer signup during checkout. The "Register" page works OK, but registration at checkout doesn't. Also, I see in the table CubeCart_newsletter_subscriber that some entries have a "validation" code like 51edf897c51348103717f4e05d8578e8 where others are NULL. NOTE: By CubeCart Mailing List I mean the list that can be exported from (in 6.1.14 admin) Newsletters > Export Mailing List with format: {$EMAIL_ADDRESS} <{$FIRST_NAME} {$LAST_NAME}> It's not clear to me where CubeCart is pulling this data from, so not clear why First Name and Last Name are not available for entries made during signup at checkout.
  15. @bsmither Only your first suggestion worked. The second resulted in a page that hanged for a few seconds, white screen of death, and this error in the site error log: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8960 bytes) in /home2/mysite/public_html/mystore/modules/plugins/SFWS_Mailchimp/hooks/class.newsletter.subscribe.php on line 108 (line number would be approximate because I have original code commented out rather than replaced)
  16. Thank you - I can undo my clumsy workaround. No subscription during signup at checkout followed by subscribe after address/shipping update works OK - through to gateway with no WSOD. First name and surname in CubeCart mailing list and sent to MailChimp OK. Subscribe during signup at checkout - through to gateway OK but still no first name or surname in CubeCart mailing list (so email address only sent through to MailChimp). No PHP Errors in the error log.
  17. 5 if(!defined('CC_DS')) die('Access Denied'); 6 7 $mailchimp_status = $GLOBALS['config']->get('sfws_mailchimp', 'status'); 8 $mailchimp_api_key = $GLOBALS['config']->get('sfws_mailchimp', 'mailchimp_api_key'); 9 $mailchimp_list_id = $GLOBALS['config']->get('sfws_mailchimp', 'mailchimp_list_id'); 10 11 if ($GLOBALS['user']->is() && !isset($email)) {
  18. I've managed to break a clean 6.2.1 store with MailChimp plugin enabled and reproduce my problem (my store is 6.1.14). - Add test product to basket - Click Checkout in Mini Basket - Fill all details, all checkboxes selected EXCEPT DO NOT SUBSCRIBE TO MAILING LIST - Card Capture as gateway - Secure Checkout button - Green banner - address updated, shipping options, logged in at top of screen, SUBSCRIBE CHECKBOX VISIBLE - Click Subscribe checkbox on this screen - Secure Checkout button (again) - Gateway fails - white screen of death (on Safari, 500 error on some browsers) So the problem seems to be if the first subscription box is empty and the second subscription box is checked. (If the first box is checked then the other should not appear.) Commenting out one checkbox seems to cause the same problem. Testing my 6.1.14 store using the same method: The first name and surname are included in the CubeCart mailing list (but no information sent to MailChimp list via the plugin) Error in the site error log : PHP Fatal error: Call to a member function is() on null in /home2/mysite/public_html/mystore/modules/plugins/SFWS_Mailchimp/hooks/class.newsletter.subscribe.php on line 11 If the MailChimp plugin is disabled then the gateway works OK My clumsy workaround was to add "disabled" to the input for the second checkbox and to comment out the label. I'm sure there's a more elegant solution that will keep the mailing_list input visible to CubeCart but invisible to the customer. {if !$USER_SUBSCRIBED} <div class="row"> <div class="small-12 large-8 columns"> <input type="checkbox" id="mailing_list" name="mailing_list" value="1" disabled ><!--label for="mailing_list">{$LANG.account.register_mailing}</label--> </div> </div> {/if} If a guest customer unchecks the subscription checkbox on during signup at checkout, then when address/shipping is updated another subscription checkbox will appear but no label text and not clickable - it looks like a small glitch and easily ignored. What it does is preserve the unsubscribe state from the original signup and so allows the gateway to function without error.
  19. On further testing, I'm finding that if the first subscription box is unchecked by the customer and the second subscription box is checked by the customer then this causes a white screen of death for the card capture gateway.
  20. I think that no name is recorded in the mailing list if the only subscription checkbox is the first one shown when the guest is filling out their address details - in that instance only the email address is recorded in the mailing list. The name is not recorded because at that point the customer is not logged in. If the second subscription checkbox shows after the address has been updated and the new customer has been logged in, then their first name and surname are included in the mailing list. However, if I force the second checkbox to show then I end up with the gateway white screen of death and the PHP error from the MailChimp plugin. So how do I fix this and ensure that a new customer's name is recorded in the mailing list (not just their email)? Maybe referenced here:
  21. I thought that the 0 or 1 value meant checked or unchecked. I understand now that the element contains a 1 value, and that value is stored if the box is checked (am I right)? So, if the value is 1 and the code contains checked="checked", that will result in the customer actually being signed up to the mailing list (ie. the value doesn't need to change because a ticked box is not just cosmetic). Also, what would be the best way to make the checkbox ticked by default for guest signup during checkout, but to show the correct stored value for an existing (logged-in) customer? === Any clue as to why first name and surname might not be making it to the CubeCart mailing list? I've upgraded Card Capture gateway from 1.0.5 to 1.0.6 and PayPal Standard gateway from 1.0.4 to 1.0.8, and the mailing list checkbox code changes above - but that's all. Previously, when I was able to get a subscription during guest signup to work, the names carried through to the list. If I unsubscribe and resubscribe from admin or logged in as the customer then the names carry through to the list OK, just not during checkout. === According to https://www.w3schools.com/tags/att_input_checked.asp , checked is fine. <input type="checkbox" name="vehicle" value="Car" checked> No difference between HTML 4 and 5, only XHTML.
  22. Good news - I've tracked part of my problem to me making the newsletter subscription checked by default (based on this thread). Still, I have a new issue of no first name or surname being added to the CubeCart mailing list OR the MailChimp list. I changed the following lines back to their original. content.checkout.confirm.php (2 occurrences) MINE - <input type="checkbox" id="mailing_list" name="mailing_list" value="0" checked="checked"><label for="mailing_list">{$LANG.account.register_mailing}</label> ORIG - <input type="checkbox" id="mailing_list" name="mailing_list" value="1"><label for="mailing_list">{$LANG.account.register_mailing}</label> MINE - <input type="checkbox" id="mailing_list" name="mailing_list" value="0" checked="checked" {$MAILING_LIST_SUBSCRIBE}><label for="mailing_list">{$LANG.account.register_mailing}</label> ORIG - <input type="checkbox" id="mailing_list" name="mailing_list" value="1" {$MAILING_LIST_SUBSCRIBE}><label for="mailing_list">{$LANG.account.register_mailing}</label> content.register.php MINE - <input type="checkbox" id="mailing" name="mailing_list" value="0" checked="checked" {if isset($DATA.mailing_list) && $DATA.mailing_list == 1}checked{/if}><label for="mailing">{$LANG.account.register_mailing}</label> ORIG - <input type="checkbox" id="mailing" name="mailing_list" value="1" {if isset($DATA.mailing_list) && $DATA.mailing_list == 1}checked{/if}><label for="mailing">{$LANG.account.register_mailing}</label> (Yes, I see that my code just above would say "checked" twice, but the problem was more likely to have been with content.checkout.confirm.php) So, if my code is breaking things, is it because of the VALUE = 0 or because the checkbox has been CHECKED (maybe there is some script that fires on the check action)? Is there a better way to make the subscription checked by default? No European customers, so no GDPR. BTW - here is another thread about newsletter subscription not working:
  23. TESTING GUEST CHECKOUT - CCv6.1.14 with MailChimp 5.1.2 plugin enabled/disabled Refresh MailChimp connections first in plugin setup: Create new MailChimp API key (done at MailChimp) Paste API into plugin setup & save Change list and save Change list back to main list then save CHECKOUT TEST 1 - all boxes ticked, guest sign up during checkout, mailchimp plugin enabled Logout first Add test product Click Secure Checkout in Mini Basket Fill all details, all checkboxes selected Card Capture as gateway Secure Checkout button Green banner - address updated, shipping options, logged in at top of screen, subscribe checkbox visible Secure Checkout button (again) WSOD - White Screen of Death (customer may abandon cart at this point) Site error log shows PHP fatal error is() on null Click browser back button Click browser reload page (if customer did not give up) Subscribe checkbox not visible Secure Checkout button Card Capture gateway displayed Order email received by admin Site error log still shows the PHP fatal error Subscriber IS added to CubeCart mailing list NO subscriber added to MailChimp list CHECKOUT TEST 2 - subscribe to newsletter but do not make store account Logout first Add test product Click Secure Checkout in Mini Basket Fill all details, but DO NOT create store account (stay as guest) Card Capture as gateway Secure Checkout button Green banner - address updated, shipping options, NOT logged in, NO subscribe box visible Secure Checkout button (again) Card Capture gateway displayed Order email received by admin NO error in site error log NO subscriber added to CubeCart mailing list NO subscriber added to MailChimp list CHECKOUT TEST 3 - mailchimp plugin DISABLED - all boxes ticked, guest sign up during checkout Required because of admin setting change (plugin disabled) Clear CubeCart caches except for image cache and if customer logged in (and depending on browser) Clear browser caches Reload page from origin Add test product Click Secure Checkout in Mini Basket Fill all details, all checkboxes selected Card Capture as gateway Secure Checkout button Green banner - address updated, shipping options, logged in at top of screen, subscribe checkbox visible Secure Checkout button (again) Card Capture gateway displayed Order email received by admin Subscriber IS added to CubeCart mailing list OTHER TESTS - try other subscribe methods - mailchimp plugin enabled Unsubscribe/Subscribe in Your Account/Newsletter Subscriptions CubeCart and MailChimp lists updated Subscribe using standard subscribe box on page CubeCart and MailChimp lists updated MY THOUGHTS The MailChimp plugin works for other subscribe methods, but not during checkout. The customer is added to the CubeCart mailing list during checkout if they select NEWSLETTER + ACCOUNT but not if they only select NEWSLETTER by itself - surely if they want newsletters but no store account that should be possible. Clicking the back button after WSOD and reloading the page (a) makes the {if !$USER_SUBSCRIBED} subscribe checkbox disappear and (b) allows the payment gateway to work, even though the plugin still seems to generate the same PHP Fatal Error. I could not get any subscription to the MailChimp list during checkout starting as a guest. I have also tried the 6.0.0 version of the plugin without luck. I've sent this to the developer as well - the plugin is simply not working for me. Just interested here in any comments specific to anything CubeCart is doing during checkout that may be contributing to the issue. Or if there's a very simple fix that's obvious to someone (not me).
  24. Line 11 is something like: if ($GLOBALS['user']->is() && !isset($email)) So that's the check for the user being logged in. I can't see any __destruct() function in the plugin itself, but there are CubeCart instances in cart.class, request.class, session.class and user.class.php that could play a role. I guess any plugin needs a safe way to check for a null value so that it can fail quietly at checkout (or use a stored variable from the page) without breaking the gateway. I think that CubeCart's guest customer signup process during checkout could be reviewed - even moving a code hook to another point.
×
×
  • Create New...