Author Topic: Extensions in product display page..  (Read 3253 times)

sathyashrayan

  • Beginner
  • *
  • Posts: 17
Extensions in product display page..
« 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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Extensions in product display page..
« Reply #1 on: January 19, 2012, 13:38:09 pm »
what are you trying to do?
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

sathyashrayan

  • Beginner
  • *
  • Posts: 17
Re: Extensions in product display page..
« Reply #2 on: January 19, 2012, 15:12:00 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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Extensions in product display page..
« Reply #3 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?


J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27605
  • Always on vacation
    • Jenkin Hill Internet
Re: Extensions in product display page..
« Reply #4 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.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33