- Posts: 640
- Thank you received: 16
Pass category as a parameter to module
- PeterChain
-
Topic Author
- Offline
Less
More
11 years 3 months ago #206647
by PeterChain
Pass category as a parameter to module was created by PeterChain
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
I want a Hikashop Content Module to show different categories depending on the product showing but I don't want to create 30 different modules one for each available category, so I would like to be able to invoke the module inside the show_default.php by passing a parameter to the module taken from a custom field.
Is this possible?
Would be something like a loadposition statement...
{loadhikamodule MyCustomizableModule this->row->category_type_for_CustomizableModule}
What you think? Should exist a trick...
-- Joomla version -- : 3.4.1
I want a Hikashop Content Module to show different categories depending on the product showing but I don't want to create 30 different modules one for each available category, so I would like to be able to invoke the module inside the show_default.php by passing a parameter to the module taken from a custom field.
Is this possible?
Would be something like a loadposition statement...
{loadhikamodule MyCustomizableModule this->row->category_type_for_CustomizableModule}
What you think? Should exist a trick...
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206650
by nicolas
Replied by nicolas on topic Pass category as a parameter to module
Hi,
I don't know of such trick. It's possible, if you develop your own loadposition content tag plugin.
An easier solution would be to have different modules (one for each category) and specify the id of the module in a custom product field. Then, you could use the value of the field with a standard loadposition module in order to load the correct module.
I don't know of such trick. It's possible, if you develop your own loadposition content tag plugin.
An easier solution would be to have different modules (one for each category) and specify the id of the module in a custom product field. Then, you could use the value of the field with a standard loadposition module in order to load the correct module.
The following user(s) said Thank You: PeterChain
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
11 years 3 months ago #206700
by PeterChain
Replied by PeterChain on topic Pass category as a parameter to module
[quote="An easier solution would be to have different modules (one for each category) and specify the id of the module in a custom product field. Then, you could use the value of the field with a standard loadposition module in order to load the correct module.[/quote]
This is exactly what I do and what I want to avoid as there can be more than 50 categories so it means 50 modules to be made, but all of them look exactly the same except from the category shown.
So, this is exactly why I want the category parameter transferable through parametrization
This is exactly what I do and what I want to avoid as there can be more than 50 categories so it means 50 modules to be made, but all of them look exactly the same except from the category shown.
So, this is exactly why I want the category parameter transferable through parametrization
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206724
by Xavier
Replied by Xavier on topic Pass category as a parameter to module
Hi,
So on a product page, you want to display a module listing categories in relation with the currently displayed product, right ?
I think that a good solution will be to edit the view used by the module, and in that view get the current CID of the displayed product and based on this information change the categories to display.
So on a product page, you want to display a module listing categories in relation with the currently displayed product, right ?
I think that a good solution will be to edit the view used by the module, and in that view get the current CID of the displayed product and based on this information change the categories to display.
The following user(s) said Thank You: PeterChain
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
11 years 3 months ago #206817
by PeterChain
Replied by PeterChain on topic Pass category as a parameter to module
This sounds interesting, I will consider this solution.
Thanks a lot!
Thanks a lot!
Please Log in or Create an account to join the conversation.
Time to create page: 0.194 seconds