- Posts: 73
- Thank you received: 0
How to clone category view module
10 years 9 months ago #224373
by sokartch
How to clone category view module was created by sokartch
-- 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
-- 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.
10 years 9 months ago #224375
by Xavier
Replied by Xavier on topic How to clone category view module
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:
www.hikashop.com/support/documentation/1...ize-the-display.html
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:
Code:
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.
10 years 9 months ago - 10 years 9 months ago #224897
by sokartch
Replied by sokartch on topic How to clone category view module
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
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: 10 years 9 months ago by sokartch.
Please Log in or Create an account to join the conversation.
Time to create page: 0.206 seconds