- Posts: 10
- Thank you received: 0
Add custom »Layout on Product Page«
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.40
-- Browser(s) name and version -- : Firefox 34.0
Hello Everybody,
as the title suggests, I am searching for a way to add a custom layout for a single Product on the Product page. I would like to have it appear in the dropdown list, shown on the screenshot attached.
How can I do that?
Thanks in ahead!
Please Log in or Create an account to join the conversation.
Go to editing a product layout similar to the new customized one you want to create, for example "show_default". When open for editing, you can change its name and save it under that new name. It'll then be displayed in the dropdown list of available layouts for a product, both in the default product settings as well as for the individual product.
Needless to say that you can customize that layout then any way you want.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
Looking at that method just showed me that each file in:
templates/<each folder>/html/com_hikashop/<each folder>/
whose name starts with "show_", or "show_quantity_" and ends with ".php" will be used in the list, either as layout, or layout for the quantity…
In short, and I hope to help others with this: If you need a new »Layout on a Product Page«, just create File in a Folder as explained above and call it "show_<whatevernameyoulike>.php", or "show_quantity_<whatevernameyoulike>.php" and it will appear in the list.
Please Log in or Create an account to join the conversation.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
- Posts: 640
- Thank you received: 16
This would be:
templates/you_template/html/com_hikashop/product/ show_your_file_here.php
DON'T MAKE THE MISTAKE of cloning your show_xxx.php file in the same folder of the original file, this is
components/com_hikashop/views/product/...
it won't add to the list.
As for the template, if you have three different tempaltes with different show_ files all them will be listed in the product form.
Please Log in or Create an account to join the conversation.
- Posts: 640
- Thank you received: 16
I mean if I have a product menu for listing a certain brand or category I would like to have apart form Table, DIv, and List also those custom product layouts available at Type of layout Dropdownlist
In the pictures is for Category Type of Content but the feature should be appliable for both Category and Product.
Please Log in or Create an account to join the conversation.
I add this idea on our TODO list.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It's not possible yet easily.
But you can always edit the ones already available and use different code in them based on the current global $Itemid (which is the id of the current menu item) of the page. And thus reach the same function. It's just a bit less practical.
Please Log in or Create an account to join the conversation.
1. Open components>com_hikashop>views>tmpl>show_default.php
2. Copy the file to "/templates/yourtemplate/html/com_hikashop/product
3. The layout shown puts the product image on the left and the description and add to cart on the right .You can see in the code that i changed the hika classes to match the uikit grid class
With this method there is no css changes to make you can let the uikit handle the layout - enjoy!
Please Log in or Create an account to join the conversation.
thanks for sharing this!
I also use a yootheme template with warp7 so i used your product display mod. Unfortunately this seems to make a littel bit trouble if i use shortcodes within my product description that worked otherwise well. So are there any constrains so that shortcodes e.g. a nonumbers accordeon slider does not display correct anymore?
you can see the result here:
dev.iq-guru.com/angebote/iq-guru-shop/pr...alten#webinar-ablauf
i integrated the slider on the very bottom of the description text but it also shows up in the first collum as you can see.
Any help highly apriciated!
thanks
carsten
Please Log in or Create an account to join the conversation.
Can you provide a screenshot of the settings of your product and a screenshot of the change you made in the show_default view ?
Please Log in or Create an account to join the conversation.
thanks for answering. Yes sure i can provide these screenshots. I attach theme here and the code of my show_default.php is this (just a copy of the code of huwhuw as i use also a yootheme template.
Thanks in advance for your help!
Regards
Carsten
Please Log in or Create an account to join the conversation.
Normally, you're supposed to use a module or a position content tag:
docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
These are compatible with the social networks plugin but it seems that you're doing it differently and it's not taken into account by the social networks plugin.
Please Log in or Create an account to join the conversation.
i adressed this issue to peter the developer from nonumbers plugins. He investigated it further and told me this
"The issue is caused by the pinterest social button, which is placing the {slider} tags inside it's link."
So i went back to the documentation of hikashop and searched how to remove the pinterest share button and found an article that integration with social networks is done via a plugin. I digged around but did not find wich plugin this is.
So my question is if it is a problem with the sliders plugin as it merges with the socal plugin or if it is a problem with my view template that mashes up things?
Thanks again for your help!
regards
carsten
Please Log in or Create an account to join the conversation.
The problem is a conflict between the social networks plugin and the slider tag plugin you're using.
The social networks plugin adds the description of the product in the pinterest button as it is a necessary information in order to create the button.
But the slider tag plugin yo'ure using replaces the slider tag not only in the normal description display of the product page but also inside the pinterest button and thus it breaks the button.
As I said, the social networks plugin only handle loadmodule and loadposition tags and no other tag so it's normal that it does that.
We can potentially add a rule to trim out the tag you're using before adding the description to the pinterest button, but for that, we would need that you provide the exact tag you're using so that we know how to trim it out.
Please Log in or Create an account to join the conversation.
first thanks for your patience! Now i understand. Ok the tag for the slider is documented here:
www.nonumber.nl/extensions/sliders
So as nonumbers plugins are often used plugins while it is very easy with them to structure a product description with sliders and tabs ( www.nonumber.nl/extensions/tabs ) it would be great if it would be possible to use them right in the product description without first building a html module and then inserting this via loadmodule.
I would be very happy if you could strip out those tags.
Thanks a lot in advance!
have a good weekend!
carsten
If you need anything else from me please let me know!
Please Log in or Create an account to join the conversation.
Thank you for the explanations.
I've modified the social networks plugin to handle these tags.
Install it via the Joomla installer and let us know how it goes.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
first thanks for your work. I just updated the plugin and cleared all caches. Unfortunately it changed only a bit. Now the text in the accordeon that is shown in the social bar is the right on and the style was correct as well. But still the accordeon is shown in the social bar where it is missplaced mirrored
You can check this here:
dev.iq-guru.com/angebote/iq-guru-shop/pr...ten#webinar-ablauf-2
Thanks in advance for your work! Hope you have a sunny day!
regards
carsten
Please Log in or Create an account to join the conversation.
Please try again with this package:
Please log in or register to see it.
Please Log in or Create an account to join the conversation.