VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: piru on May 29, 2015, 11:03:37 AM

Title: GTIN (EAN,ISBN) show in Frontend
Post by: piru on May 29, 2015, 11:03:37 AM
Hi,

I try to show the EAN from the product in Frontend. I just filled the field GTIN (EAN,ISBN) in teh product, but I don´t see this one in Frontend. I looked in Configuration but I don´t see a place to activate this viewing.

Thanks
piru

EDIT: I use Virtuemart VirtueMart 2.6.6
Title: Re: GTIN (EAN,ISBN) show in Frontend
Post by: jenkinhill on May 29, 2015, 11:54:12 AM
You should be using at least VM2.6.10  - http://forum.virtuemart.net/index.php?topic=118683.0

To display the GTIN make a template override of the relevant template within components/com_virtuemart/views/productdetails/tmpl/  (assuming you don't already use overrides, eg in a commercial VM template)

Include the code wherever suits your required layout.
I use:
GTIN: <?php echo $this->product->product_gtin ?>
Title: Re: GTIN (EAN,ISBN) show in Frontend
Post by: piru on May 29, 2015, 13:07:20 PM
Thanks!!
Title: Re: GTIN (EAN,ISBN) show in Frontend
Post by: piru on June 01, 2015, 14:54:36 PM
I made this like this:
// Product Description
if (!empty($this->product->product_desc)) {
    ?>
        <div class="product-description">
<?php /** @todo Test if content plugins modify the product description */ ?>
    <span class="title"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE'?></span>
<?php echo $this->product->product_desc?>
        </div>
<?php
    
// Product Description END
// EAN
if (!empty($this->product->product_gtin)) {
      
?>
EAN: <?php echo $this->product->product_gtin;
     }
// EAN END


I want ti find this EANwith the search, but doesn't go. I think it will work only if I write the EAN code in the description, but I don#t want to make this.
Do you know how can I do that in the search the EAN will be find? In the configuration from products search there ist not a place wo stay Product GTIN
Title: Re: GTIN (EAN,ISBN) show in Frontend
Post by: piru on June 03, 2015, 11:10:22 AM
nobody know how can I do this? or ist to complicated?

Cheers piru
Title: Re: GTIN (EAN,ISBN) show in Frontend
Post by: GJC Web Design on June 04, 2015, 22:35:53 PM
what happens if you add say   , '`p`.product_gtin'  to the $filterArray array on

administrator\components\com_virtuemart\helpers\shopfunctions.php

static function getValidProductFilterArray ()

gives the chk box anyway..
Title: Re: GTIN (EAN,ISBN) show in Frontend
Post by: piru on June 05, 2015, 10:12:35 AM
I can say you what happens:
It works perfect!!!  :)

Thank you
Cheers piru