News:

Support the VirtueMart project and become a member

Main Menu

1.9.8G ADD TO CART is not working

Started by Geee, September 18, 2011, 19:30:07 PM

Previous topic - Next topic

mlvrsol

Quote from: mlvrsol on October 10, 2011, 07:23:02 AM
if you enable the "System - Language Filter"-Plugin in Jommla 1.7, then the "Add to Cart"-Button does not work in Internetexplorer. (without Language Filter it works fine)
Any ideas how to fix this? (is there some js-file which i can modify this easily on my own (i'm not familiar with jquery, etc)?)
best greetings, martin

ok, found a solution already (if anyone had teh same problem):

replace the line:       
$jsVars  = "siteurl = '". JURI::root(true) .'/' ."' ;\n" ;
in file "administrator/components/com_virtuemart/helpers/config.php"

with:
$lang =& JFactory::getLanguage();
$locales = $lang->getLocale();
$lg = explode('_',$locales[0]);
$JOOMLA_LANGUAGE = $lg[0];
$jsVars  = "siteurl = '". JURI::root(true) . '/' . $JOOMLA_LANGUAGE . '/' . "' ;\n" ;

:-)

Studio 42

Dear user,

We have added on Back-End setters to deactivate JQUERY and some script and CSS if you want.
Look what you need to deactivate, depending your template module.

Best is to look in firebug the loaded script.
If you have jQuery 2 time then you have a conflict and must deactivate it in Back-end

For last post from mlvrsol, on doing this the path is wrong then i don't know why this work(or because you have another Jquery loaded) the BE setter must resolve it correctly.

TKs all for your reports

Patrick

mlvrsol

Hi there, Patrick

thanks for your fast reply!

the code above works with the J1.7 native "System - Language Filter"-Plugin and when and when Joomla "Use URL rewriting" is switched on.

It has nothing to do with other JQUERY Scripts or css, because i tested a fresh setup of virtuemart.1.9.8H on J1.7 (as it comes with no other extensions) and the Beez2 - Default Template. If you turn on the System - Language Filter in this test-environment and use URL rewriting, then the AddToCart Button wont work in InternetExplorer.

But nevertheless, VM is great! keep it up ;)
looking forward to the next release
kind regards,
Martin

Studio 42

Hi mlvrsol,

I found why, it's a pure JOOMLA trick witting directly as root : ROOT/LANGUAGE when you add the language filter plug-in

I think the joomla team have to solve this, because the problem is not only in virtuemart, but i do next a fix .

mlvrsol

hi there,

i found another bug with the "Add To Cart" Button and Internetexplorer: IE caches the ajax call, so if you have added  product to the card and then add the same product later the Quantity is not raised (so the product is not addet to the cart!)

Maybe you can fix this in further releases? i done some small workaround (to get it to work with version 1.9.8H)  in the file vmprices.js and addad a random string, so IE will do the ajax call because so the url it isn't in browser-cache:
function sendtocart(form){
var datas = form.serialize();
   var randomnumber = Math.floor(Math.random()*9999999999999);
   $.getJSON(siteurl+'index.php?option=com_virtuemart&view=cart&task=addJS&format=json&nocache='+randomnumber,encodeURIComponent(datas),

etc...

meffisto

If you have any problem with module VM - Shopping cart or module VM - Category in Joomla template and you using Widgetkit from Yootheme you must Off jQuery in VM setting (tab Template)

Studio 42

you can setup ajax to dont use the cache

I look if , the best is to never use the cache in product details or to add manually the randomnumber

Studio 42

for the language problem you can try this temp solution

http://forum.joomla.org/viewtopic.php?f=617&t=664932

Hope this is adopted by joomla in core files

dontflinch

#23
I am also having this problem.  I have made sure there is a jquery noconflict line after the other library load.  at first the button itself would not work.  but after doing that and unchecking the virtuemart jquery button it at least does the action and goes to the cart page but gives an empty cart, that just says the following:
Product prices result   $0.00   $0.00   $0.00

I  have tried unchecking all four backend vm choices and the google and 'external google jquery library' and still get the same thing.

edit:  if I turn off the vm jquery the state dropdown stops working on the billing/shipping screens.

it is pretty common nowadays for sites to have other js/jquery items loading and I would hope something can be done to fix this.  as another poster said - having a shop without a working cart that works is not very useful.


p.s.  I love virtuemart and have used it for many years.  I tried another shop and did not like it for many reasons and hope going forward the jquery stuff is figured out.  I will probably look at using another template and hope the occ plugin is done soon.

notanothernumber

I'm having the exactly same problem as dontflinch as well (see website www.costumeglitz.com.au) where if I switch off the 'Using the Virtuemart jQuery' the cart functionality works but adds nothing into the cart!? Any ideas out there?

notanothernumber

Thank fek got this to work! Go into configuration.php file and change the entry:

public $dbtype = 'mysqli'
TO
public $dbtype = 'mysql'

Would be good to know why this worked though, any explanations out there?