Hello
I have 3 components that use to integrate the Core VM AddToCart feature (add to cart, pricing and vmcustom fields) via the VM api, but recently latest VM3.4.5 (or previous, not sure) broke that. Html is loaded but CSS and JS only partly load and Add to cart button doesn't add anything but redirects to the cart page.
If any one has a clue on what changed, it would be greatly appreciated.
Thanks!
Adrien
Hi Adrien,
a link to a not working example might help.
Maybe you are missing the class product-container for the product container. I think the script uses that for finding the root of the product.
Stefan
Thank you for your help.
Actualy I downgraded to VM 3.2.14 to solve the issue. Every newer version breaks it.
Some clients also have the same issue.
I'll setup another online test so I can reproduce and share a link.
QuoteI'll setup another online test so I can reproduce and share a link.
Correct - Test in a development environment firstEvery new version has changes - that is why it is released.
If you are coming from 3.2.14.
Your templates, overrides and or plugins must be tested for compatibility with the latest version - if you see an issue then you should look to the developers of these plugins/templates for support before you upgrade live.
QuoteDoesn't add anything but redirects to the cart page.
Look in your browser developer too console for the error - that would give you a better idea of what need modifying
Quote from: nordmograph on June 11, 2019, 23:19:51 PM
Actualy I downgraded to VM 3.2.14 to solve the issue.
Ah come on, that is not "solving". My customsize and my download plugin still works.
Hello, I have the same problem. We have a plugin to calculate prices of custom sizes of products. Sometimes those product are not added to the cart. The plugin developpers say that the cause is a virtuemart performance problem
Quoteit is not a problem of our plugin, not even only of your web, you can try the product by deactivating the plugin to check it. It does not have to do with changing the amount or not, it's a virtuemart performance problem. If you do the same test, changing dimensions data or not, it is indifferent, but waiting a few seconds between change and change of field, and leaving the request text blank, or waiting again a few seconds before hitting the button will work. If you simply enter the page, you type very quickly in the text of requests (a key pressed for example), and you hit the button immediately, it does not work.
The solution would be in the internal code of virtuemart, for example blocking the button until the other functions have finished or making the button work synchronously. Perhaps in the VM support they have some other additional solution.
Thanks for your help
Brassens you have a completely different problem, likely to be down to server performance or template. Impossible to guess further without further information such as J/VM versions etc.
Ok, I solved my Add to cart compatibility problem (that was actually only happening in one extension integrating VM addtocart),
by updating the code
if(!class_exists('shopFunctionsF')){
require JPATH_BASE.'/components/com_virtuemart/helpers/shopfunctionsf.php';
}
vmJsApi::jQuery();
vmJsApi::jSite();
vmJsApi::jPrice();
vmJsApi::cssSite();
echo vmJsApi::writeJS();
Making sure the Joomla chosen library was now also loaded
So this is solved. Thanks for your inputs.
You never stated what extension you had this problem with??