News:

Support the VirtueMart project and become a member

Main Menu

Fail to save product characteristics

Started by nikpony, January 09, 2013, 23:02:57 PM

Previous topic - Next topic

nikpony

Hello to all, i wish a happy new year.
First of all, i am using VM 2.0.6 and Joomla 2.5.4.
Well, i am trying the plugin that user metapps offers here before months, for changing prices for shopper groups...here is the forum where this plugin is included.
http://forum.virtuemart.net/index.php?topic=94895.30

I uploaded the file, i have installed and enable the plugin and i am ready to save my prices...i am clicking save and i am getting the following message...
Fatal error: Call to undefined method VirtueMartModelCustomfields::storeProductCustomfields() in /home/omor/public_html/administrator/components/com_virtuemart/models/product.php on line 1413

I am looking in this line and we have this...

if (!$isChild) {
         if (isset($data['save_customfields'])) {
            if (!class_exists ('VirtueMartModelCustomfields')) {
               require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'customfields.php');
            }
            VirtueMartModelCustomfields::storeProductCustomfields ('product', $data, $product_data->virtuemart_product_id);
         }
      }
If i wrote before the VirtueMartModelCustomfields::storeProductCustomfields an else it is working and the prices are being saved, but when i will choose an override in prices, it doesn't save it, and it deletes the field of override price...
I don't have good knowlegde of php and i can't solve it, also i don't want to update to the latest vm version because i have edit the files a lot and i am almost ready to go online this site...I need your help!

nikpony

I hope that someone of the users in this forum will help me...

jenkinhill

Current version of VirtueMart 2.0.18a and there have been many changes & improvements since 2.0.6. Including that prices can now be set for each shopper group.

I guess metapps may be able to help as he wrote the plugin but he has not been in the forum for 3 months.
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

nikpony

Ok lets do an update!
But i have 5-10 files that i have edit, and i am afraid that i will lose all of them.
How can i update the whole version except of this files???
The most files are inside the following folders:
components/com_virtuemart/views/cart
components/com_virtuemart/views/category
components/com_virtuemart/views/productdetails
components/com_virtuemart/views/user

jenkinhill

You should have use template overrides!! Copy your edited templates into your Joomla templates html directory for this, eg as your_template/html/com_virtuemart/cart/ (put your cart overrides here) - use the same way for each of your overrides.  That way they do not get overwritten.

However, they will need updating as some of the VM output elements have changed. The changes are documented in the live update information, see  http://virtuemart.net/index.php?option=com_content&id=416  and work backwards through versions.

Make all updates on a backup copy of the site - never on the live site!
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

nikpony