Jump to content

jasehead

Member
  • Posts

    213
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jasehead

  1. The other aspect of this problem is that the basket ends up empty. I tested my 6.0.12 store and couldn't get it to fall over, only the 6.1.14 version. Error Log is mostly full of: "PHP Warning: Invalid Security Token in /home2/myserver/public_html/cubecart/classes/sanitize.class.php on line 152" and "PHP Warning: Stored session data did not match DB record. Session aborted as possible session hijack." Old IP Address and New IP Address both the same, although the user agents are different: Old User Agent: '"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"' New User Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15' "in /home2/myserver/public_html/cubecart/classes/session.class.php on line 702" I've tried testing in the normal browser and in responsive view and the error will occur when testing in either mode and is not from switching modes during testing.
  2. I wasn't able to replicate the problem on Firefox, but Safari and Chrome both use webkit. For copyright I show the year by the following code: <noscript>2015</noscript><script type="text/javascript">document.write(new Date().getFullYear());</script> So the javascript would write 2018 but the noscript is still 2015. Weird that a script in the copyright would be the only part of the page to render.
  3. I've upgraded from 6.0.12 to 6.1.14 and I'm testing before going live, but I have an issue that breaks the store. Here is the order of events: Home page Scroll to first item and add to basket Scroll to second item and add to basket Click View Basket - seems fine Click Secure Checkout - seems fine Changed my mind - click store logo to return to buy more Scroll to first item and click again (forgot that I already did this) BLANK PAGE with only 2018 visible Refresh the page (because you would) - basket is now empty Scroll and click first item - blank page with 2018 again Refresh again Scroll to another item I know I haven't clicked - 2018 blank page again I've tested this on the Foundation skin as well, so it's not a skin issue. I've also tried the vanilla 6.1.14 catalogue.class.php and it breaks with that too. I'm wondering if CubeCart is over sensitive to the whole CSRF thing. Safari 11.1 and Chrome 65.0 both break, but Firefox 59.0.1 correctly displays the shopping basket with a "You can't buy more than we have" alert. Here are some headers from Safari for the broken page: Request Headers Name: Value Accept-Encoding: br, gzip, deflate Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15 Accept-Language: en-au Resonse Headers Name: Value Content-Type: text/html; charset=UTF-8 Date: Sun, 15 Apr 2018 18:34:03 GMT Accept-Ranges: bytes Server: LiteSpeed X-Powered-By: PHP/5.6.35 X-Frame-Options: SAMEORIGIN Set-Cookie: CCS_569AEF99F1=67duu6cakceudp9bk9b7aeu7t0; expires=Sun, 22-Apr-2018 18:34:03 GMT; Max-Age=604800; path=/; domain=.private.com.au; secure; HttpOnly, CCS_569AEF99F1=67duu6cakceudp9bk9b7aeu7t0; expires=Sun, 22-Apr-2018 18:34:03 GMT; Max-Age=604800; path=/; domain=.private.com.au; secure; httponly Content-Encoding: gzip Vary: Accept-Encoding alt-svc: quic=":443"; ma=2592000; v="35,37,38,39" I'd be interested if anyone else can reproduce the problem or if it's just me. Any advice on where to start or how to fix it?
  4. Couldn't work out how to further reduce the padding around the icons (there should be a way to reduce the button padding/whitespace all the way down to the icons themselves), but I did find a simple space to remove between the icon-bars and the icon-search: In main.php find: <div class="right text-center show-for-small"><a class="left-off-canvas-toggle button white tiny" href="#"><svg class="icon icon-x2"><use xlink:href="#icon-bars"></use></svg></a> <a class="button white tiny show-small-search" href="#"><svg class="icon icon-x2"><use xlink:href="#icon-search"></use></svg></a></div> And just remove the space in the middle: <div class="right text-center show-for-small"><a class="left-off-canvas-toggle button white tiny" href="#"><svg class="icon icon-x2"><use xlink:href="#icon-bars"></use></svg></a><a class="button white tiny show-small-search" href="#"><svg class="icon icon-x2"><use xlink:href="#icon-search"></use></svg></a></div> In Chrome developer tools, I was able to reduce the viewport from 294px to 288px wide before the icons jumped to the next line - so 6 pixels and enough to solve my layout problem on Samsung.
  5. I even tried 0rem but the bars/search icons still spill over to the next line. Definitely something different about the SVG version. My custom skin has the following edit in main.php to increase the logo and reduce the search box: <div class="row marg-top" id="top_header"> <div class="small-6 large-6 columns"><!-- was 4,3 --> <a href="{$STORE_URL}" class="main-logo"><img src="{$STORE_LOGO}" alt="{$CONFIG.store_name}"></a> </div> <div class="small-6 large-6 columns nav-boxes"><!-- was 8,9 --> I'm using a Samsung S7 (default browser) for mobile testing, and also Chrome developer tools with responsive set to 294 wide, which is enough to make the icons spill over like on the Samsung.
  6. Here's my working update for 6.1.14 with SVG icons (to make the shopping cart icon pulse green when there is an item in the basket): In /skins/yourcustomskin/templates/box.basket.php, find: <div id="mini-basket"> Add after: <style scoped> {literal} @keyframes pound { from { transform: scale(1.10); } 50% { transform: scale(0.75); } to { transform: scale(1.10); } } {/literal} </style> Find: <div class="text-right"><a href="#" id="basket-summary" class="button white small"><svg class="icon icon-basket"><use xlink:href="#icon-basket"></use></svg> {$CART_TOTAL}</a></div> Replace with: <div class="text-right"><a href="#" id="basket-summary" class="button white small"><span style="{if isset($CONTENTS) && count($CONTENTS) > 0}color:green;font-size:1.10rem;{/if}"><svg class="icon icon-basket" {if isset($CONTENTS) && count($CONTENTS) > 0} style="animation: pound 2s linear infinite;"{/if}><use xlink:href="#icon-basket"></use></svg> {$CART_TOTAL}</span></a></div> Find: <div class="show-for-small-only"><a class="right-off-canvas-toggle button white tiny" href="#"><svg class="icon icon-basket icon-x2"><use xlink:href="#icon-basket"></use></svg></a></div> Replace with: <div class="show-for-small-only"><a class="right-off-canvas-toggle button white tiny" href="#"><span style="{if isset($CONTENTS) && count($CONTENTS) > 0}color:green;{/if}"><svg class="icon icon-basket icon-x2" {if isset($CONTENTS) && count($CONTENTS) > 0} style="animation: pound 2s linear infinite;"{/if}><use xlink:href="#icon-basket"></use></svg></span></a></div> And my old font-awesome code for Cubecart 6.0.12 (prior ro SVG) was: <div class="text-right"><a href="#" id="basket-summary" class="button white small"><span style="{if isset($CONTENTS) && count($CONTENTS) > 0}color:green;font-size:1.10rem;{/if}"><i class="fa fa-shopping-cart{if isset($CONTENTS) && count($CONTENTS) > 0} faa-pulse animated{/if}"></i> {$CART_TOTAL}</span></a></div> and <div class="show-for-small-only"><a class="right-off-canvas-toggle button white tiny" href="#"><span style="{if isset($CONTENTS) && count($CONTENTS) > 0}color:green;{/if}"><i class="fa fa-shopping-cart fa-2x{if isset($CONTENTS) && count($CONTENTS) > 0} faa-pulse animated{/if}"></i></span></a></div> although this also required the font-awesome-animation.min.css to be installed in /skins/yourcustomskin/css/font-awesome/css/ and added to the <head></head> section in /skins/yourcustomskin/templates/main.php <link href="{$STORE_URL}/skins/{$SKIN_FOLDER}/css/font-awesome/css/font-awesome-animation.min.css" rel="stylesheet"> Although I am finding that in 6.1.14 the SVG layout of icons on mobile is not the same as font-awesome - seems to be more padding than there was. Any tips on reducing padding for the bars/search/basket icons for small/mobile view?
  7. Before the LScache problem was fixed with CacheDisable in htaccess, clicking on a remove-item icon or the Empty Basket button did prime something because clicking the Update Button then put that into effect. I could click to remove item #2 and then click the Update Basket button to "make it so". Workaround no longer required but, programatically, rather than changing the behaviour of remove-item or empty-basket the trick would be to then fire the Update Basket button. I agree that disabling the non-working elements would be the quickest solution.
  8. UPDATE - my server does have lscache (LiteSpeed Cache) built in. I though CubeCart was meant to work OK on LiteSpeed (!) I'll disable lscashe from .htaccess by adding: CacheDisable public / CacheDisable private / AND WOULD YOU BELIEVE THAT IT FIXED THE PROBLEM?!?! Remove-item and Empty Basket both working.
  9. I had set some ExpiresByType set in .htaccess for some items set to one month - I've disabled all of that. Still waiting on response from hosting provider. Server is running PHP 5.6.35, 10.2.14-MariaDB, LiteSpeed. Whatever the issue for 6.1.14, it's also the same problem for my live 6.0.12 cart. Wouldn't be a PHP extension? The remove-item icons and Empty Cart button are coded as links where the Update Basket is a submit button and the radio buttons also submit the page to recalculate postage. Can I change the remove-item and Empty Cart links to be submit buttons instead, or in some other way get a click on these to submit the page?
  10. After reverting to earlier backups, removing all custom edits, turning off Expires Caching in htaccess, trying a vanilla install of 6.1.14 without plugins and working through Maintenance > Database to fix all indexes I'm still lost. I don't understand why remove-item and Empty Basket won't work properly. I thought that the basket wasn't working as a result of the radio buttons mod above, but it seems not. I don't understand why remove-item might work once for one item out of six, but not for any others. I don't understand why the Update Basket button updates the cart and refreshes the page but the Empty Basket button doesn't.
  11. Looking at CCv6.1.14 /classes/cart.class.php around line 1019, I see that the remove function is supposed to (if it works) finish by calling the update function around line 1066. I tried moving... return $this->update(); ...to outside of the IF clause so it would fire regardless - no change. Also tried commenting out the IF clause and closing bracket so the code would run unconditionally - still nothing. To test this I used CubeCart Admin to empty the cache, and also emptied browser cache, deleted history and reloaded page from origin - so it should have been fresh. WORKAROUND Clicking the remove-item icon does remove the item (and the Empty Basket button too), but nothing appears to change and the basket is only refreshed properly by the Update Basket button. Can you suggest a way to make the Update Basket button effect work after any code for remove-item or empty basket has been executed?
  12. I'm finding the same issue in our live store running 6.0.12 - I'm going to wind back to 6.0.11 to see if there is any difference (that was before the radio buttons mod). I don't remember deleting items from the basket being any problem. Some customers did they they had problems deleting items but whenever we tested it worked fine for us, although we did notice some rare orders come in that had one or two items with no description and a $0.00 value. One other thought - we have just moved web hosts, so I'm wondering if there could be any issue with that. We had do dumb down to PHP 5.6 for one of our CubeCart plugins to work. Would there be anything in the server environment that could be causing this issue?
  13. I've just compared my dev store to a vanilla download of 6.1.14 and I can't find any custom mods that should be doing this, unless there is some syntax error somewhere.
  14. Code snippets: Apply a discount code via a URL - class.user.register_user.inserted Send registration confirmation email - class.cart.construct.pre Makes sure random (featured) product to be shown is in stock - class.gui.display_random_product NOTE: When I reviewed these, there was no PHP code visible (I recently upgraded the dev site from 6.0.12 to 6.1.14) so I have just now rebuilt each snippet. I found that clicking the delete icon on the old code snippet had similar problems to removing an item from the basket. Deleting a snippet only worked if the page was fresh. Plugins: By Weight 1.1.0 Card Capture 1.0.5 Mailchimp 1.0.1 PayPal 1.0.4 (PayPal Standard Payment Gateway) Preorder Goods 1.0.4 Print Order Form 1.0.1 Possible custom code edits having an effect: /js/common.js - line 109: (see jasehead post 219517, August 3, 2016) was $('select.update_form').change(function(){ changed to $('update_form').change(function(){ but also tested as original code and doesn't seem to make any difference anywhere /skins/mycustomskin/2.cubecart.js - line 82: (see bsmither post 219518, August 3, 2016) was $(".autosubmit select").not('.nosubmit').change(function() { changed to $(".autosubmit select, .autosubmit input[type='radio']").not('.nosubmit').change(function() Still confused that the Foundation skin with no edits has the same issue, and that the code snippets page in Admin had a similar problem with deleting items. Enable Debugging seemed to cause a too many redirects error, so had to disable again.
  15. In the debug section, I see '_a' => basket in the sanitise section with no hash. Then, further down, there is '__basket' => 'contents' => and each item has its own hash. The items in the debug are listed in reverse order, but each hash matches the remove-item hash. I was able to remove one or two items from a list of 12 before it stopped working - sometimes the last item in the list can be removed OK. Tested with the user not logged in and then logged in - same result. I did think that most of my edits (radio buttons in this thread) were done in my custom skin, and changing back to the vanilla Foundation skin still has the same issue. Can you suggest any core files that would play a part in the shopping cart? The items not working for me are the Empty Basket button and the remove-item icons. Refreshing the page doesn't fix the basket but the Update Basket button does.
  16. I'm testing 6.1.14 with the radio buttons for shipping (see thread), but there seems to be an issue with removing an item from the basket - if I click the delete icon the item doesn't delete, even though the page flashes from a refresh. Manually refreshing the page or clicking Empty Basket doesn't work in a similar way, but the Update Basket button DOES work and then shows the updated basket with all changes. I've tested the default Foundation skin and the problem persists, so I'm at a loss. I did have one edit in /js/common.js at line 109 (from my post on August 3, 2016): $('select.update_form').change(function() was changed to $('update_form').change(function() Tested, but didn't solve the remove-item-in-basket problem. Interesting that this old edit didn't seem to change anything in 6.0.12 over the past two years. --- A workaround would be to fire off the Update Basket button or similar code when the Empty Basket button or a Delete/Remove item icon is clicked - any suggestions on how to do that? --- This also seems to be an issue with my live store running 6.0.12 (clicking the delete icon doesn't appear to remove an item from the basket) - so this may be a pre-existing problem for me. I tried the CubeCart DEMO store and couldn't reproduce the issue.
  17. I know I'm resurrecting an old topic, but if the CubeCart demo store is on MariaDB 10.0 then is there a plan for CubeCart continue to support both MySQL and MariaDB if the Maria fork starts to diverge from MySQL in later versions? Also, any issues with Litespeed as an Apache replacement?
  18. I'll have to check the server log next time it happens - being a shared server the log only shows the last minute or less from all sites hosted on the server. The PHP log is showing that my mysql user for the cubecart database... "already has more than 'max_user_connections' active connections in ...classes/db/mysqli.class.php on line 33" I tend to have multiple tabs open. But would max_user_connections be a problem if I had multiple customers at the same time?
  19. From 18 Nov to 07 Dec I've had maybe 2 or 3 occurrences of a 405 Not Allowed error, usually during closing a customer order from admin (open the order, change the status to completed, add notes and save). So far it has been difficult to trap - opening the console in Safari after the fact shows no request or response header information because the console probably has to already be open to collect any data. Still, I will say that the web host's response to increase the memory limit and execution time seems to have changed the error from reproducible to rare. Not sure why it should have any effect. Also not sure why I can't get the error to trip if I do the same action - you'd think the method would remain the same.
  20. I noticed an unusual drop in orders this week. I tested cart checkout and received 405 Not Allowed errors (nginx/1.12.1) when the Secure Checkout button is clicked and data is passed to the payment gateway. I have PayPal, Card Capture and Print Order Form gateways available and the 405 error occurs for all. The 405 error can also occur in Admin when saving product edits, so it seems to occur after submitting a form. It can be an intermittent error - repeated tries may succeed and once it works it continues to work (but most customers seem to be abandoning the effort if the store isn't working). I understand that nginx is web server software similar to Apache, but with speed and resource benefits. I contacted my host and their response was to increase the memory limit and execution time, orders seem to be coming in again but I received another 405 error updating a product so it's still an issue. Is there anything more I should suggest to my web host, or is there some PHP in CCv6.0.12 that can be edited to avoid the 405 error? (I'm stuck with 6.0.12 including security patches for now, and I don't have direct access to nginx config.)
  21. My request is more about managing stock level control than customers. Statistics are also involved because CubeCart might say I've sold 10 items but 6 might have been returned. I would have hoped that in CubeCart Admin, if the inventory of a customer order is changed that stock levels are also changed. Item deleted from order inventory = product added back to stock level and sale removed from statistics Item added to order inventory = product taken from stock level and sale added to statistics or perhaps keep the original item sent and put the same item on a second line as a MINUS 1 amount to show that it had been returned Would any of that work with the current version of CubeCart? Or backing out of the order process would return the stock, but there would need to be more control on when customers get sent an e-mail (a tickbox would do it, so automatic e-mail could be turned off before the order was saved). COMPLETED - stock level is current PROCESSING - back one step, stock level still current, turn off auto email PENDING - order inventory added back to stock level, turn off auto email Then, for a replacement item, adjust the order inventory and proceed through the order process again - although I don't want to confuse the customer by automatic emails saying that they just placed or paid for an order (PENDING/PROCESSING), but I do want to be able to include custom text about their completed order (like I do for every order). I guess the above would also apply to a partial refund where one item was returned and the rest kept. For a complete return and full refund of the whole order, I would probably move the status to CANCELLED and use a CubeCart email template for cancelled orders to allow some custom text. General discussion (not tech support): If you're a CubeCart merchant and you use CubeCart to manage stock levels for returns and replacements, what steps do you do?
  22. Is there a standard procedure for managing returns in CubeCart v6? Assume that a customer has purchased and received an item, but they want to return the item for (a) an exchange for another item, or (b) a refund or partial refund (they may be returning one item out of six received). Is there a way using CubeCart to: Receive the item back into CubeCart (stock level) Adjust the Customer's order (again, stock level if a replacement item issued) Generate e-mails to the customer showing that the return has been received and that a replacement item has been sent, or a refund or partial refund has been issued In older versions, it used to be possible to backtrack from Completed to Processing and then Pending to return stock, adjust the order, then Cancel for a refund or proceed again to Processing and Completed - does this still work for CCv6?
  23. Still getting instances of overseas customers being able to complete an order and pay only local delivery rates rather than airmail - for a recent order the price I paid to send the item was more than the total (goods+shipping) that the customer paid, so I felt like I sent them the goods for free and paid them a tip for my trouble. I think the issue occurs when the customer is purchasing as a guest rather than being logged in. Cubecart v6.0.12 Foundation - no upgrade until after Christmas sales period is over.
  24. I want the postage estimates displayed because most of my customers are local. However, I'm not sure why overseas customers have slipped through with local shipping rates. Seems to be the last two (since 13 June), all the previous overseas sales seem to have the correct shipping. My checkout has been modified for radio buttons - which is why I posted here (modifications are discussed in this thread). The radio button code changes may have caused the shipping rates to not be updated as the customer completed their details, or it may happen on a vanilla Foundation store - I don't know. I'm still using 6.0.12 (still waiting on some features before upgrading). The radio button code has been in operation since Aug 2016, so there must be another fail point.
×
×
  • Create New...