News:

Looking for documentation? Take a look on our wiki

Main Menu

VM 3.0.18 - Users can order deactivated products

Started by jzmm, October 20, 2016, 09:17:47 AM

Previous topic - Next topic

jzmm

Joomla   3.6.2
VM         3.0.18
php        5.6.5

After the VirtueMart Update some Customers ordered disabled Products.

When I click on the product link in the order e-mail,  I get a 404. Also it's not possible to find them "manually" by searching the name, ID...

The only idea I have is that the customers see a cached version of the site, where those products are still activated. But even this I can not really imagine.

How is this possible? What can I do to solve it?

Jörgen

When have these Products been unpublished ?

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

This is really strange. You can try it yourself..... put a product in the cart and unpublish it, reload and it should be gone.

lol damn, does not work. you are right. There is a small typo. Open the cart helper /components/com_virtuemart/helpers/cart.php

Search in the function prepareCartData around line 1574 for

$productTemp = $productsModel->getProduct($productdata['virtuemart_product_id'],TRUE,true,false,$productdata['quantity']);


and replace it against

$productTemp = $productsModel->getProduct($productdata['virtuemart_product_id'],TRUE,TRUE,TRUE,$productdata['quantity']);
Should I fix your bug, please support the VirtueMart project and become a [url=http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail]member[/url]
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jzmm

Thank you very much!

Hopefully this fixes the bug ;)

But can you explain why some customers saw those products and others don't?
Those products where already deactivated before the update.


Best regards.

StefanSTS

Quote from: jzmm on October 20, 2016, 14:10:45 PM
But can you explain why some customers saw those products and others don't?
Those products where already deactivated before the update.

Is it possible that in those cases the customer had the product already in the cart from an earlier visit?
In these cases it is best to ask the customer what exactly happened.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Milbo

The changed parameter even removes products from the cart.
Should I fix your bug, please support the VirtueMart project and become a [url=http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail]member[/url]
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Yes, the explain is basic. Old cart, is in session, so if you connect you the product is(was displayed) and because getProduct do not checked for published, it was valid.
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]