VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: sathyashrayan on January 19, 2012, 08:37:54 AM

Title: Extensions in product display page..
Post by: sathyashrayan on January 19, 2012, 08:37:54 AM
I am on the process of learning VM.20.. I understood the following way of customizing a product display page..
 
  a)Copy the following file from [path]/components/com_virtuemart/views/productdetails/default.php to the [path]/templates/[our template]/html/com_virtuemart/productdetails/

  b)Then in the file [path]/templates/[our template]/html/com_virtuemart/productdetails/default.php we have to see the comments so that we can customize the divs for display.

My doubt is.. The new VM 2.0 is MVC based. So i could change the model to make an functionality. But it will get lost in further core update. So how can I face this issue? Abstract and create a plugin? And how can I display that in a template page? May be in the productdetails page? Please guide.. Thanks
Title: Re: Extensions in product display page..
Post by: PRO on January 19, 2012, 13:38:09 PM
what are you trying to do?
Title: Re: Extensions in product display page..
Post by: sathyashrayan on January 19, 2012, 15:12:00 PM
Quote from: BanquetTables.pro on January 19, 2012, 13:38:09 PM
what are you trying to do?
Learn By trial and error..On that learning process i just wanted to know what if any extension made and need to be shown? May be some extension (extra functionality)  in product , category ect. Do i need to create a plugin and show it in default.php? I am confused.
Title: Re: Extensions in product display page..
Post by: PRO on January 19, 2012, 15:51:24 PM
it depends

IF the field is a custom column in the product table, you can access it like this

<?php echo $this->product->COLUMN_name ?>

IF the field is a custom column in the category table, you can access it like this

<?php echo $this->category->COLUMN_name ?>

THEN: if its a custom way that product options are displayed. You would create a plugin.
http://dev.virtuemart.net/projects/virtuemart/wiki/Product_Plugins

SO< I dont know what u mean by extension made. ( a joomla extension)?
OR, are you talking about extending vmart functionality?

OR, are you talking about customizing the output?


Title: Re: Extensions in product display page..
Post by: jenkinhill on January 19, 2012, 18:00:00 PM
Functionality is ideally altered/enhanced by using plugins - the core should not be edited.

Output is altered by changing views (templates & css), with template overrides.