VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: techwarehouse on February 02, 2017, 05:00:36 AM

Title: First item on first visit disappearing from cart
Post by: techwarehouse on February 02, 2017, 05:00:36 AM
Hi hopefully I am posting this in the right place,

Joomla V 3.6.5
Virtuemart v 3.0.18

On the first visit to the site if you add an item to basket then go checkout it is not there. If you click continue shopping then go to cart it is there.

If you go back and add another item it works or if you have visited the page before it works.

I have changed to default templates, different templates, disabled every plugin or component we have installed and it still happens.

As far as i can see it must be a VM bug I am experiencing as even on all default it still happens?

website is www.techwarehouse.co.nz/test

Title: Re: First item on first visit disappearing from cart
Post by: Milbo on February 02, 2017, 19:51:48 PM
Do you work with ssl? When you use ssl, you should use it per htaccess.
Title: Re: First item on first visit disappearing from cart
Post by: techwarehouse on February 02, 2017, 21:11:55 PM
Hi,

I linked teh wrong site above it should be techwarehouse.co.nz/test

I have turned force ssl off and it seems to be working on the non ssl version of the site.

Can i ask what you mean?

I am using the standard htaccess file

It is also renamed as .htaccess but i am not using url rewriting.

Any help would be great please.
Title: Re: First item on first visit disappearing from cart
Post by: GJC Web Design on February 02, 2017, 21:18:42 PM
when u enable ssl then ALL calls to the site must be https://.....

If you add to cart and the e.g. popup link to cart is http only then the session is broken and the cart will show empty

so you can force all calls to be https in your .htaccess  ..  google the snippet needed
Title: Re: First item on first visit disappearing from cart
Post by: techwarehouse on February 02, 2017, 21:29:00 PM
Hi,

The whole site is forced ssl by default. I just turned it off then to test. To make teh problem happen you can clear browsing history, visit the site and then add an item to cart, hit go to cart and it will be gone. Next time you visit the site this wont happen unless you clear browosing history and then it will happen again.

I have turned ssl on for the whole site again now.

It seemed to have gone away when i turned ssl off completely.
Title: Re: First item on first visit disappearing from cart
Post by: techwarehouse on February 02, 2017, 21:31:59 PM
I have just tried it now and it seems to be working. This happened yesterday, I didn't change anything and by the end of the day the problem was back again.

I really dont know where to look or what might be causing this.
Title: Re: First item on first visit disappearing from cart
Post by: GJC Web Design on February 02, 2017, 23:37:29 PM
Quotehit go to cart

how?  popup, module or menu?

and carefully check the http  /  https when u reach the empty cart

I have seen this exact same problem  on multiple sites from ONLY the popup go to cart and solved by hard coding it to the hidden cart menu (padding.php)
Title: Re: First item on first visit disappearing from cart
Post by: techwarehouse on February 02, 2017, 23:44:40 PM
This is on the pop up only, I will check what you are saying now thank you :) But it sounds like you may have hit the nail on the head

How do i hardcode it?

I'm sure i can find padding.php but not sure what I should change.
Title: Re: First item on first visit disappearing from cart
Post by: Milbo on February 03, 2017, 08:29:59 AM
There is a switch in the padded. So you need just to enable the other option "sef_for_cart_links", it is a hidden config, maybe it solves your problem