VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: webzight on February 20, 2013, 20:23:57 PM

Title: Update VM without losing custom product description?
Post by: webzight on February 20, 2013, 20:23:57 PM
Don't know if this is the right place to post this and I did search without any results forthcoming?

How can I update VM without losing my custom product descriptions, i.e. weight, dimensions, etc ???

Every time I update, I have to go dig down through the code sections and redo this and it's really odd that I have to this, when these things could be either part of the core code or at least a clickable option to display, or not :o
Title: Re: Update VM without losing custom product description?
Post by: jenkinhill on February 20, 2013, 23:38:39 PM
If you mean you have hacked the core code then that code will be deleted, but in an update category & product data is not lost from the database and their images are not affected. However if you use template overrides in a version earlier than 2.0.10 then they will need editing to comply with the changes in VM output.

The safest update method is to use Joomla's extensions installer.

If you are still using Joomla 1.5 then note that this is no longer supported.
Title: Re: Update VM without losing custom product description?
Post by: webzight on February 21, 2013, 00:54:39 AM
Thanks for the reply Kelyvin.

On the site in question, it's running under that latest version of Joomla, but have not updated VM from  2.0.12b because of said issues. 

In order to get the item descriptions to display the weight and dimensions, I had to add code snippets to the "productdetails/tmpl/default.php" file.

Code which I got off this forum and works just great, until I update, that is!

What I've have started doing is creating a copy of the modified default.php file and then using that in place of the overwritten file.

My only concern is that I made be wiping out a legitimate update of that file by replacing same with modified copy, this means digging down through the new file to see if any changes where made in the update.

There has got to be a better way ::)
Title: Re: Update VM without losing custom product description?
Post by: jenkinhill on February 21, 2013, 10:47:01 AM
That is a template file so you should be using it as an override - nothing new, overrides were introduced with Joomla 1.5 to stop component/module template changes from being overwritten during updates.  The override file should be placed in joomla_root/templates/(your_template)/html/com_virtuemart/productdetails/
See http://www.ostraining.com/blog/joomla/overrides  and  http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system
Title: Re: Update VM without losing custom product description?
Post by: webzight on February 27, 2013, 04:04:49 AM
Thanks Kelvyn for the accurate info :D

I just around to implementing the override trick and now my life will be upgrade worry free, hopefully ::)