News:

Support the VirtueMart project and become a member

Main Menu

Extensions in product display page..

Started by sathyashrayan, January 19, 2012, 08:37:54 AM

Previous topic - Next topic

sathyashrayan

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

PRO


sathyashrayan

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.

PRO

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?



jenkinhill

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.
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