News:

Looking for documentation? Take a look on our wiki

Main Menu

GTIN (EAN,ISBN) show in Frontend

Started by piru, May 29, 2015, 11:03:37 AM

Previous topic - Next topic

piru

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

jenkinhill

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

piru


piru

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

piru

nobody know how can I do this? or ist to complicated?

Cheers piru

GJC Web Design

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..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

piru

I can say you what happens:
It works perfect!!!  :)

Thank you
Cheers piru