News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[solved;template issue]Add to cart not working in Product Details list

Started by outbreak198x, July 18, 2016, 19:59:04 PM

Previous topic - Next topic

outbreak198x

Hello,

i've searched a lot, but did not find the fault of the website...

When i select a product with "add to cart" - or "in den Warenkorb" in the categroy view... - everything is normal, popup with addad to cart
But if i go in details page and try the same - nope - just redirect to "Empty cart"

i do not know what happened, because the site just relaunched, and everything works great, the version before uploading on the webserver is still working great, so i thought i copy back the product details php file, but same problem.
i tried also some settings with jquery in configuration, but still same issue.

Live Shop:
http://www.red-ring.at/shop-redring

I will be happy if anyone has some suggestions :)

Jumbo!

Just checked your site. It seems to be working perfectly fine to me.

outbreak198x

I tested it on many computers, and phones, not working on detail page ;)

for e.g. http://www.red-ring.at/shop-redring/zubeh%C3%B6r-f%C3%BCr-ventilatoren/filterboxen/lfb-100-detail
you can press add to cart, and you'll be redirected to an empty cart.

You have also to empty the cart before....

What i've seen is that the quantity Buttons not working, so it will be a JS conflict, but which one... i don't know :(

jenkinhill

You are loading the VirtueMart JavaScript files on the category page, but not on the product details page for some reason, so there is no VM function.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

outbreak198x

So the question is.. why it is on the Live shop, but not in local testshop - php version? - the fault is in database, because i tried a new backup, replacing all files with my working config, and it does not work too... - so maybe there is a plugin or module killing this?  - or can there be something in virtuemart config - compared all things with my local thing, and seems to be the same.

Studio 42

If you use a modified template, it's possible that he overide this view and the instruction is missing.
You need to have echo vmJsApi::writeJS(); at end of file
YOURSITE\templates\YOURTEMPLATE\html\com_virtuemart\productdetails\default.php

All old templates break because this. But  you don't have many instruction about this from VM team.

outbreak198x

There is an override yes, but not in this folder, and thats not the reason why it does not work, because it works on same Joomla and VM Version locally.

i tried to add the line, but nothing changed :(

Studio 42

I think, you have really a problem with the template.
I cehcked jquery events for the add to cart button. You have 28 event on click "add to cart" button when you come from category view.
You have too much javascript loaded.
The submit form is minified in your warp javascript.
SO the problem is in your jmf corporate template, and should be upgraded, check with the template developpers, none can help you here.

StefanSTS

Hello,

looking at your head tag and what is inbetween there is a lot more to do than just getting the quantity to work.

CSS is loaded, JS is loaded, CSS is loaded again, again JS. This will slow down the site like crazy. JQuery loaded two times, if I see that right.
Maybe it should be considered to throw out some extensions too, and optimize the delivery of the scripts.

Two times loading of JQuery could be a starting point to get the script on the product page running again.

So short
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.

outbreak198x

yes that's all correct, JS and so on...

but.... why i can not just copy all files from the working backup over the live shop... - the problem is still there if i do that?
so it can not really be a template issue in my eyes?

Milbo

Quote from: Studio 42 on July 19, 2016, 12:28:03 PM
If you use a modified template, it's possible that he overide this view and the instruction is missing.
You need to have echo vmJsApi::writeJS(); at end of file
YOURSITE\templates\YOURTEMPLATE\html\com_virtuemart\productdetails\default.php

All old templates break because this. But  you don't have many instruction about this from VM team.

Yes, I just notice it is missing here, http://docs.virtuemart.net/tutorials/development/175-code-adjustments-for-virtuemart-3.html

Your work would much more apreciated, when you would just suggest to add it. So, added now
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

StefanSTS

Sorting that out can be quite a long process, the template or extensions are mostly the reason for problems, so starting there is normally the first step.

Guess I would go on now with switching off all extra extensions and using the Protostar so see if that combination is working.

What differences are there between your developement system and the live system? PHP versions are the same?

--
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.

outbreak198x

Lol, i'm such an iditot... - last time testing it, i wrote something wrong - thx to all, added this, now working great.

Still do not know, why it works in local backup copy, but thats not really interesting for me.

Maybe i'll renew the template, it's not really a difficult one.

Thx again