News:

Support the VirtueMart project and become a member

Main Menu

ISBN In Product - Front end

Started by entropia, December 13, 2020, 22:55:36 PM

Previous topic - Next topic

entropia

Hello,

I have a problem, I'm not able to display ISBN code when Products are displaied in the shop
I tried to serch for a solution in many topics but didn't have any result

Joomla! 3.9.23 Stable
VirtueMart 3.8.6 10373
php version 7.3.2.2

Can someone help me?
Thanks in advance

AH

on product page

$this->product->product_gtin

on category page

$product->product_gtin
Regards
A

Joomla 4.4.5
php 8.1

entropia

Thank you for your answer,

sorry but I don't understand where I have to insert that code, in which file and the location in the folder

GJC Web Design

add over rides for the VM product displays  to your template

components\com_virtuemart\views\productdetails\tmpl\default.php
over ridden in
templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php

add the  echo 'ISBN: '.$this->product->product_gtin;

components\com_virtuemart\sublayouts\products.php
over ridden in
templates/YOUR_TEMPLATE/html/com_virtuemart/sublayouts\products.php

add  echo 'ISBN: '.$product->product_gtin;

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

entropia

Hi,

thanks again for your support, I am not so expert in writing code, can you please give me more detailed information:


add over rides for the VM product displays  to your template

components\com_virtuemart\views\productdetails\tmpl\default.php

over ridden in


1) templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php ----> I created the folders and copy the file


1.a) add the  echo 'ISBN: '.$this->product->product_gtin; ----> could you explain to me in which part of the code I have to insert it and the syntax?



2) components\com_virtuemart\sublayouts\products.php ----> Found!

over ridden in


2a) templates/YOUR_TEMPLATE/html/com_virtuemart/sublayouts\products.php ----> I created the folder "sublayouts"


2b)add  echo 'ISBN: '.$product->product_gtin; -----> could you explain to me in which part of the code I have to insert it and the syntax?



Thanks!
F.



GJC Web Design

the syntax is there

the position is trial and error .. what's the worst that could happen?
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