Error Adding/Removing Items to/from Cart Module

  • Posts: 30
  • Thank you received: 1
11 years 10 months ago #55699

I've set up an online store and all appears to be going well except for a few niggly items.

When I add items to my cart, regardless of what I've got in the configuration page for checkout, I get booted back to the home page (even though the item is added to the cart).

If I go to the checkout and remove an item from the cart, all works how it's supposed to ("Cart is empty message"), with the exception that the cart module still appears to have items in it. Clicking on "Proceed to Checkout" again indeed shows me that there are items in the cart. If I remove items from the cart using the module I get a 404 error message.

I initially thought these errors might have been something to do with the use of SEF URL's, specifically using sh404SEF but turning that off does not resolve the issue.

Help!!! I'm going crazy with this!

http://www.designcutz.com

Last edit: 11 years 10 months ago by zeusrw. Reason: forgot url

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 10 months ago #55764

Maybe you have a caching issue.
Please make sure that all the caching is disabled on your website:
Disable the cache in Joomla configuration.
Site -> global configuration -> system -> "Cache settings".
Disable, if it's enabled, a joomla cache plugin.
Check your template' options for a potential cache option and deactivate it.

The following user(s) said Thank You: prettysitepublishing

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

  • Posts: 30
  • Thank you received: 1
11 years 10 months ago #55812

Cache cleared/purged
Cache wasn't enabled in global config
Cache wasn't published in plugins

Problem still remains. The template I've used is built in Artisteer which as far as I can tell does not have any caching options.

Any other ideas?

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 10 months ago #55885

Could you try to change the line:
<input type="hidden" name="url" value="<?php echo $this->params->get('url');?>"/>

to:
<input type="hidden" name="url" value="<?php echo hikashop_currentURL();?>"/>

in the file "cart" of the view "product" of your front end template via the menu Display->Views ?

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

  • Posts: 30
  • Thank you received: 1
11 years 10 months ago #56332

That did it, thanks!

However, I think I've also stumbled across the real culprit. An extension called "Securitycheck" which I thought had been disabled but somehow became re-enabled. As I understood it, this extension just looked at your active extensions and advised as to whether there were updates available. This also has a plugin that adds "security", after I "fixed" the problem using your solution above, I re-enabled sh404SEF and all was going well until I went to checkout and then got a 400 error message indicating that I looked like a hacker "too many requests". I remember having this issue before and so when I went and looked at this plugin, I found it had been enabled, once again, disabling it and proper operation was restored. I even went back and "unfixed" the "cart" file and the problem seemed to be gone. Re-enabling Securitycheck and it came back.

Sorry for being a pain on this one but I hope what I discovered will help someone else.

Last edit: 11 years 10 months ago by zeusrw. Reason: error in initial comment

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 10 months ago #56407

Thank you for the feedback !

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

  • Posts: 214
  • Thank you received: 1
11 years 1 month ago #98271

Hi There,

I'm having a similar issue (as I mention in www.hikashop.com/en/forum/3-bug-report/8...earing-the-cart.html )

I've tried your following tips (changing the line of code and disabling the cache) but that is still not resolving my issue.

Any help would be greatly appreciated.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 1 month ago #98274

Looking at your other thread, is sounds like the problem is totally different and it's just that either you didn't enter a "URL when the cart is empty" in the configuration and that this URL is incorrect.

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

  • Posts: 214
  • Thank you received: 1
11 years 1 month ago #98327

Hi There,

I've get my index page of www.lastseasons.co.uk/ set in Configuration for the 'URL where to redirect when the cart is empty' field. Is there somewhere else, maybe in the Views that I should be looking?

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 1 month ago #98451

Hi,

I tried to add/remove products to/from the cart on your website and didn't had any problem. Either you fixed it or the problem is related to your browser cache or something. For me everything is ok.

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

  • Posts: 214
  • Thank you received: 1
11 years 1 month ago #98504

Hi Nicolas,

It's fine if you are on the front page, or on the product page.

The problem is only if you try clearing the cart by pressing the X (using the cart on the right hand side of the screen) while you are on the Checkout screen or subsequent payment pages that causes the 404.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 1 month ago #98693

Hi,

It sounds like the "URL when cart is empty" option of your hikashop configuration is not configured properly.
Can you check that you have a valid URL there ?

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

  • Posts: 214
  • Thank you received: 1
11 years 1 month ago #98694

Hi Nicolas,

I've got www.lastseasons.co.uk/ which is the frontpage of my site.

I think the issue might be that I upgraded recently, but my product/cart.php has a customization so it's still classed as 1.6.0. However if I remove the customization I get a big 'Proceed to checkout' button and I don't know how to restore my current design with the small cart on the left (I've taken over this website from someone else).

If I remove the customization so it updates to the latest version I could see if that helps, but then could you advise how I style it like how it currently looks?

Hope I'm making sense!

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #98757

Hi,

In first time you can save the content of your current "product / cart" view in an external file to not lose the changes.
Then delete the customization, you can then use something like "winmerge" to see differences between files, and use back your previous modifications.

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

  • Posts: 5
  • Thank you received: 0
11 years 1 month ago #98795

Hi There,

I've tried using Winmerge like you said, but I'll be honest and I don't know exactly what I'm doing when it comes with code.

I'm uploading the php for my current and what would be my new product/cart. I can see that icon_cart.png class="small_cart_icon" is probably what I need, but I have no idea where it would go in the updated code!

Note: This is matps, I've had to sign up a new account for work reasons.

Attachments:
Last edit: 11 years 1 month ago by breakout. Reason: New Account

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 1 month ago #99075

Hi,

Here is the file with the new version and your modifications applied to it.

Attachments:

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

  • Posts: 5
  • Thank you received: 0
11 years 1 month ago #99190

Hi Nicolas,

I'm afraid that didn't work, it kept the 'Proceed to checkout' blue button, and I still had 404's when trying to clear it from the Checkout page.

Last edit: 11 years 1 month ago by breakout.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 1 month ago #99452

Hi,

Can you try to set the "force a menu on checkout" option of the configuration to a hikashop menu item ? Does that help ?

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

  • Posts: 40
  • Thank you received: 2
10 years 5 months ago #135514

thaioptics.com
Feel free to access my site, but don't be surprise if it takes a very long time to load or even time out. I subscribe for the cheapest hosting plan. I've just known that my plan has 1 MB for a shared international bandwidth.
========
Right now, I'm facing this problem too :sick:

JoomSEF + Hikashop

when I had tried to delete an item from the cart module, I got 404 not found. Of course, when I disabled SEF, everything works fine.

I tried to follow your instruction above ( replacing by <input type="hidden" name="url" value="<?php echo hikashop_currentURL();?>"/> ) but it doesn't work and the weird thing happen. My Google Chrome showed the php source code when I had deleted my cart, very weird.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #138688

Hi,

Sorry for the late reply, do you have solved your problem ?
If not, thanks to update your hikashop version, try to remove views customizations or things like that.

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

Time to create page: 0.145 seconds
Powered by Kunena Forum