News:

Looking for documentation? Take a look on our wiki

Main Menu

Can not add new product unless "Product Pricing" section is removed

Started by billynair, March 23, 2015, 15:41:50 PM

Previous topic - Next topic

billynair

The Meat:
We try to add a new product and hit "Save" and nothing at all happens. We delete the "Product Pricing" section (Hit the red (X) in the top right corner" and it saves just fine.

The question:
How can we add or alter prices using the "Product Pricing" section?

More Fluff:
We have just switch to Joomla from another CMS and found VirtueMart is one of the most popular "Shopping Carts". Assuming with the popularity of Joomla and VirtueMart that almost everything "Basic" shops will need will be fairly straight forward. After reading up and installing VirtueMart, we were pretty stoked. We added a bunch of items to the cart and then everything stopped. It took us a week to chase down the problem. The error we were getting was

Error: Error: Syntax error, unrecognized expression: #mprices[product_price_publish_up][]-lbl
Source File: http://honu4.com/media/jui/js/jquery.min.js
Line: 2


None of the solutions we found were helping and we were about to jump ship and then we found that removing the "Product Pricing" section gave us the ability to add products again. w00h00!! Right?!? Not really... we need to add prices to products. We can not edit products if we keep the "Product Pricing" section open.

Other stuff of interest:
VirtueMart - 3.0.6.2
Joomla - 3.4.1.
tried installing the older version of Joomla 3.4.0. (Totally new Database, completely fresh "public_html")
We tried adding a "Safe Path" up above the "public_html"
We installed and configured JQuery Easy.

We were able to get VirtueMart to work on one of our computers, but it is an old Vista machine with FireFox 18 on it. We tried it on IE, Chrome, FireFox 36, with and without plugins, safemode, on a Mac with Safari, all with no positive results. We tried with both registered users, both set to non-vendor, alternating who is vendor, and the only good results were on the Vista machine, with either user, as vendor or not. We deleted Joomla cache. I set up Joomla/VirtueMart on a totally different server with a totally different client (even different host, BlueHost vs GoDaddy, and shared VS VPS) with the same results. We were thinking there is a setting somewhere that we must have not set because, how the heck can so many people be using VirtueMart and not edit prices?!?

Anyone with any clues?!?
Kick out before you slap the lip

jenkinhill

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

billynair

Thank you very much for that quick response @jenkinhill, unfortunately we ALSO tried using Joomla 3.4.0 with the same problems... And, we are new to Joomla, so we don't have anything older than 3.4.0
Kick out before you slap the lip

billynair

I just tried to redo Joomla 4.3.0 again, JUST IN CASE, and it still does NOT work on any other computer other than our Vista computer.

Joomla - 3.4.0 (Yes ZERO not 1, double checked 3 times, even get the "Install new Joomla 3.4.1 now" message on top)
VM - 3.0.6.2

Kick out before you slap the lip

billynair

Just to be on the safe side, we installed Joomla 3.3.6 and it still is not working.
VirtueMart - 3.0.6.2, do we need to roll back the VirtueMart too?
Kick out before you slap the lip

billynair

Sicos came up with an answer in another thread, this one works on all our computers!!

The quick answer is that you need a '0' in the second brackets like this:

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

This is taken from his post:
Quote
Open the file --> /administrator/components/com_virtuemart/views/product/tmpl/product_edit_price.php

Change these lines:

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


To:

It's on line 144 and 147, make sure that you add the 0 between the brackets... this fixes the problem.

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

Kick out before you slap the lip