Help with persistent anonymous cart

  • Posts: 6
  • Thank you received: 0
9 years 9 months ago #190658

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome 40.0.2214.111

I should probably provide a bit of context.

One of our requirements is to store a comment per cart and per product item. Our client has expressed that THEY DO NOT WANT USERS TO LOGIN (If so, we could have made use of the wishlist). With that requirement and constraint, we decided to augment the cart itself since guest carts were available and I began to build a plugin that would, at least for product items, fulfill that requirement (called a 'wishcart'). I created a hikashop 'view' to be added to the checkout workflow. I also set the $go_back to true in onAfterCheckoutStep - this essentially created an anonymous persistent cart which is what our client desired. I also overrode the checkout/cart.php to:

1. add a textarea for note capture
2. perform a query that would set the value of the textarea to the note previously entered - of course, only if our custom table exists and there was a note found for the cart product item.
3. 'repurposed' the quantity update icon to submit the form (I just removed the condition where the input value had to be different from the last known product quantity)

I got the plugin to a stable working state in a local sandbox and of course, when installing on a live server, things got a bit strange. So now when the form submits, the checkout process appears to be completed (we receive a message saying "Thanks for your purchase"), but there is a sidebar cart module as well and that remains, so I know the cart hasn't been removed and the checkout process hasn't completed. This was a strange requirement to begin and I think I'm more confused than I ever was. I can provide back-end / ftp info is that will help you diagnose things.

Thanks in advance,

Tony

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
9 years 9 months ago #190666

Nevermind B)

Found the error - it was in the template.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum