VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: GooRu on April 20, 2015, 05:53:48 AM

Title: Cannot Save Products
Post by: GooRu on April 20, 2015, 05:53:48 AM
Hi..

VM 3.0.6.2
Joomla 3.4.1
vmuikit 2.0.14
vm productbuilder 3.0.3

When in Virtuemart editing or adding products I cannot save. When inspected with firebug I see a JS issue, so I guess my ask is how would you deal with this? there does not seem to be any issues up front, only in the admin and only when in products. All other ares of VM and J! works as normal.

JS error "Error: Syntax error, unrecognized expression: #mprices[product_price_publish_up][]-lbl"

This happens with Mac OS,
Safari 8.0.5
Firefox 36.0.4
Chrome 42.0.2
Title: Re: Cannot Save Products
Post by: ZoBabe on April 20, 2015, 06:40:15 AM
This is somewhere else on the threads as well...
  I'm guessing this will be fixed in an update, but in the meantime this works:

In the [yoursite]/administrator/components /com_virtuemart/views/product/tmpl/product_edit_price.php file, change these lines:

<?php echo  vmJsApi::jDate ($this->product->allPrices[$this->product->selectedPrice]['product_price_publish_up'], 'mprices[product_price_publish_up][]'); ?>

<?php echo  vmJsApi::jDate ($this->product->allPrices[$this->product->selectedPrice]['product_price_publish_down'], 'mprices[product_price_publish_down][]'); ?>



to:

<?php echo  vmJsApi::jDate ($this->product->allPrices[$this->product->selectedPrice]['product_price_publish_up'], 'mprices[product_price_publish_up][0]'); ?>

<?php echo  vmJsApi::jDate ($this->product->allPrices[$this->product->selectedPrice]['product_price_publish_down'], 'mprices[product_price_publish_down][0]'); ?>

Or just add those zeroes in the end brackets, that's what does it.

You'll find the lines at about 144 and 147 respectively.
Title: Re: Cannot Save Products
Post by: Frans D on April 20, 2015, 08:51:10 AM
This topic is 3 topics below yours, I can't believe how you managed to overlook it;
http://forum.virtuemart.net/index.php?topic=129399.0
Title: Re: Cannot Save Products
Post by: Milbo on April 20, 2015, 21:13:19 PM
lol here are around 40-50 topics with all the time the same issue.
Title: Re: Cannot Save Products
Post by: Milbo on April 20, 2015, 21:20:17 PM
http://forum.virtuemart.net/index.php?topic=129537.0