VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Rune Rasmussen on October 26, 2016, 19:02:21 PM

Title: Autosaved cart and unpublished products
Post by: Rune Rasmussen on October 26, 2016, 19:02:21 PM
It seems like there is a missing check for products saved in customers cart.


If it goes some time before they comes back, some products may have been unpublished in between, but still they will be available in the customers cart - and they can even checkout. So they are ending up buying something that might never get back in stock ...


I just tested it in Joomla 3.6.4 and VirtueMart 3.0.18.


- Logged in with a test user, not admin
- Added a product to cart
- Logged out
- Unpublished the product from admin
- Logged in again with the test user
- Opened the cart, product still there
- Placed a order sucessfully
Title: Re: Autosaved cart and unpublished products
Post by: Jörgen on October 27, 2016, 07:39:04 AM
Hello

Milbo sais that he has fixed this, if not in 3.0.18 then probably in the SVN.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Autosaved cart and unpublished products
Post by: Rune Rasmussen on October 27, 2016, 11:01:11 AM
Thanks, but obviously not in 3.0.18, since it was tested on it.

So if Milbo could tell where the fix is, it would be nice. I was not able to find it from the commit titles/descriptions at SVN.

The problem is quite annoying, so waiting for 3.1 or whatever isn't tempting: https://virtuemart.net/news/latest-news/477-release-of-3-0-18-connecting-the-loose-ends (https://virtuemart.net/news/latest-news/477-release-of-3-0-18-connecting-the-loose-ends)


Btw! If the product(s) are deleted, you can even checkout with blank product lines.

Title: Re: Autosaved cart and unpublished products
Post by: Jörgen on October 27, 2016, 13:05:41 PM
Hello again

Here is the solution:
http://forum.virtuemart.net/index.php?topic=135790.msg473276#msg473276 (http://forum.virtuemart.net/index.php?topic=135790.msg473276#msg473276)

regards

Jörgen @ Kreativ Fotografi
Title: Re: Autosaved cart and unpublished products
Post by: Rune Rasmussen on October 27, 2016, 13:13:09 PM
Ah, thanks - then it's fixed in SVN a few days ago. But doesn't show in commits.

http://dev.virtuemart.net/projects/virtuemart/repository/entry/branches/com_virtuemart.3.0.12.4/components/com_virtuemart/helpers/cart.php#L1574
http://dev.virtuemart.net/projects/virtuemart/repository/changes/branches/com_virtuemart.3.0.12.4/components/com_virtuemart/helpers/cart.php