How to clone category view module

  • Posts: 73
  • Thank you received: 0
9 years 9 months ago #224373

-- url of the page with the problem -- : www.sokart.ch
-- HikaShop version -- : last bussiness
-- Joomla version -- : last
-- PHP version -- : last

Hello

Integration of hikashop modules in the product description has few issues (does not works with characteristics)... And there isn't a possibility to define "related categories" like "related products".

I would like to place category view module on the product page, but with flexible category ID or name (defined in custom fields).

What is the best way?

Regards,
Petar Ristanovic

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #224375

Hi,

There is not really a solution for that, a workaround could be to fill the custom field value with "{loadmodule X}" where X is the id of the desired module. (this is a Joomla feature).

So before setting the custom field, you will have to create as many modules as category ID you want.
Then thanks a simple view edition, for example the view "product / show_default" display the content of your custom field thanks code like:

echo JHTML::_('content.prepare',$this->element->CUSTOMFIELD_NAME);

www.hikashop.com/support/documentation/1...ize-the-display.html

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

  • Posts: 73
  • Thank you received: 0
9 years 8 months ago #224897

Hello

This is my "perfect" solution:

1. Install paid extension "Metamod Pro"

2.In "PHP" tab paste following script:
if ( $option == 'com_hikashop' and $view == 'product' and $jinput->get('layout') == 'show' ) {
$sql = "SELECT field_xxxxx FROM yyyyy_hikashop_product WHERE product_id = " . $jinput->get('cid');
$db->setQuery($sql);
return $db->loadResult();
}

field_xxxxx: "Custom field" for "products" where I may configure "ModID1,ModID2, ..."

This shows all configured modules for one HikaShop product.

Regards
Petar Ristanovic
www.sokart.ch

Last edit: 9 years 8 months ago by sokartch.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum