Customization of the inserted products display

  • Posts: 82
  • Thank you received: 1
9 years 6 months ago #231056

-- url of the page with the problem -- : www.uniontrade.info/
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.6.0

I've copied and modified the file
plugins/system/hikashopproductinsert/hikashopproductinsert_view.php
in my template to show also the sku of the product.
But I don't find the way to display the manufacturer name, only the manufacturer id ...
Sorry I suppose this is by my poor knowledge of php but if you can, help me please.
thank you so much
Elena

Please Log in or Create an account to join the conversation.

  • Posts: 4820
  • Thank you received: 654
  • MODERATOR
9 years 6 months ago #231105

Hello,

I think you can display product SKU AND manufacturer, simply by activated some options.
Follow this steps :

- Components => HikaShop => Configuration
- Click on Display tab, and select "Default parameters for products"



- Look for Display product code (Sku code) AND Display the manufacturer, and switch them ''On".

Hope this will help you.
Regards,

Attachments:
Last edit: 9 years 6 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 1
9 years 6 months ago #231188

hi philip
my configuration is already as you describe. this works good, but only on category pages, product pages etc.
but if I put products into k2 articles with the product tag plugin I don't have options for code and for manufacturer (img 2 and 3)

this is why I edited the file plugins/system/hikashopproductinsert/hikashopproductinsert_view.php
as described in your documentation at page
www.hikashop.com/support.html?id=137:hik...ugins-coupongen-form

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 6 months ago #231211

Hi,

There is no setting to do that. you'll have to add custom code for the file plugins/system/hikashopproductinsert/hikashopproductinsert_view.php
You can use such code to display the brand:

<?php
$manufacturerClass = hikashop_get('class.category');
$manufacturer = $manufacturerClass->get($product->product_manufacturer_id);
echo $manufacturer->category_name;
?>

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum