Post by Vector224 » Tue Aug 28, 2018 1:09 am

Hello,

I am trying to display SKU, UPC & Model in my product ad page, but I don't really know how to do it, I would like to display it without having to type it in the description, does anyone have an idea of how can I do that and by the way I am using version 2.3.0.2 and I am installing Basel theme & MultiMerch software in case you need to know that.
Here is an example of a post in my website: https://www.dertna.com/index.php?route= ... uct_id=373

I appreciate your help!!

Best,

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by straightlight » Tue Aug 28, 2018 1:25 am

Non-English URL referred in the English section of the forum. However, in catalog/controller/product/product.php file, find:

Code: Select all

$data['model'] = $product_info['model'];
add below:

Code: Select all

$data['upc'] = $product_info['upc'];
$data['sku'] = $product_info['sku'];

$data['entry_upc'] = $this->language->get('entry_upc');
$data['entry_sku'] = $this->language->get('entry_sku');
In catalog/language/<your_language>/product/product.php file,

add at the end of the file:

Code: Select all

$_['entry_upc'] = 'UPC:';
$_['entry_sku'] = 'SKU:';
In catalog/view/theme/<your_theme>/template/product/product.tpl file,

add:

Code: Select all

<?php echo $entry_upc; ?> <?php echo $upc; ?>
<?php echo $entry_sku; ?> <?php echo $sku; ?>
where you want.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Vector224 » Tue Aug 28, 2018 6:52 am

Thanks for the response! I did everting right, but not sure why I am getting this error message:

UPC: Notice: Undefined variable: upc in /home4/dertnac1/public_html/vqmod/vqcache/vq2-catalog_view_theme_basel_template_product_product.tpl on line 125SKU: Notice: Undefined variable: sku in /home4/dertnac1/public_html/vqmod/vqcache/vq2-catalog_view_theme_basel_template_product_product.tpl on line 126

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by straightlight » Tue Aug 28, 2018 6:29 pm

One of your install VQMod extension also targets that file. Ensure to implement the solution in your XML file and not directly from the core.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Vector224 » Thu Aug 30, 2018 3:12 am

Hi, thanks again! I found the file that targets the prodact.tpl but every time I try to put the following code

Code: Select all

<?php echo $entry_upc; ?> <?php echo $upc; ?>
<?php echo $entry_sku; ?> <?php echo $sku; ?>
I get errors, not sure how to put it? ??? Could you please help me?

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by straightlight » Thu Aug 30, 2018 3:19 am

Hi, thanks again! I found the file that targets the prodact.tpl but every time I try to put the following code
More information is needed. What file?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Vector224 » Thu Aug 30, 2018 3:35 am

Here is the file that I am talking about you can view it here I have uploaded it to my Google Drive:

https://drive.google.com/file/d/1pXiYCz ... sp=sharing

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by straightlight » Thu Aug 30, 2018 3:55 am

The added lines instructed can't be found in the referred VQMod file ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Vector224 » Thu Aug 30, 2018 4:21 am

I know it's not there because I am not sure where to put it, maybe because it's XML file and the coding look kind of different from .tpl file.

New member

Posts

Joined
Thu May 03, 2018 4:43 am

Who is online

Users browsing this forum: No registered users and 24 guests