- Posts: 5
- Thank you received: 1
Can´t change product layout
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Firefox 37.0.2
Hi
It´s been 2 days trying without success. I have Gavick Storefront template and when I try to change "Layout on product page" it´s always the same view, changes are not taking effect.
I tried hikashop demo and when I change to Hikashop "Reversed" in the backend I see the product layout change in the frontend.
I edited some changes in show_default via the menu Display->Views, renamed it and tested in one product with no effect.
any ideas?
Please Log in or Create an account to join the conversation.
If I make a change to show_tabular and save it as show_tabular-f.php and choose that file, these last changes don´t take place, it´s still reading show_tabular.
So, the problem is about reading only show_tabular for products view, no matter what option I put in general configuration of product or particular product view.
What can be creating this problem? how to solve it?
Please Log in or Create an account to join the conversation.
Hard to say. It could be a problem with the customization of the views already done by your template.
If you temporarily switch your template to the default one of Joomla, do you still have the same issues ?
If so, please look at the view "product | show" where you should find the lines
$this->setLayout($this->productlayout);
echo $this->loadTemplate();
to load the product layout view.
It might be possible that the template override that view and force the product layout to "show_tabular" for example.
Please Log in or Create an account to join the conversation.
Please look at the view "product | show" where you should find the lines
It might be possible that the template override that view and force the product layout to "show_default" for example.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
You were right!
// we use only the tabular view
//$this->setLayout($this->productlayout);
$this->setLayout('show_tabular');
echo $this->loadTemplate();
That´s the code, I don´t know why this template is set only to tabular, but now I know how to change it.
Thank you both very much!
Please Log in or Create an account to join the conversation.
- Posts: 49
- Thank you received: 1
I think you have helped me solve my issue. I am also using Gavick Storefront as the Joomla template with HikaShop. Everything I had tried to move in Product / show_default has done nothing on the front-end. I'm going to try editing "tabular" now, even though HikaShop is set to display "default".
This has been an incredibly frustrating problem!
Please Log in or Create an account to join the conversation.
I tried to uncomment the lines Jerome and Nicolas said and now I can make changes with copies of the files.
I guess Gavick did it as for not having problems with people changing things and then the template were not working properly.
Please Log in or Create an account to join the conversation.
- Posts: 49
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
In our "customization" documentation we have a picture where you can see the different blocks in a product page with the name of each used view.
www.hikashop.com/support/support/documen...-display.html#layout
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 49
- Thank you received: 1
Thank you for sharing this. It was actually very helpful to see the image of the various blocks on the product page. One question. The block I need to move up on the page is: product/show_block_characteristic. However, this is separate from product/show_tabular. How do I move the characteristics selectors up on the page if the view that controls this is not part of the show_tabular view?
Please Log in or Create an account to join the conversation.
To move the show_block_characteristic part in the show_tabular view, you just have to move the code:
Please Log in or Create an account to join the conversation.
- Posts: 49
- Thank you received: 1
That did it! Thank you! I've been running around in circles trying to figure this one out. It now looks like I want it to.
Please Log in or Create an account to join the conversation.
- Posts: 49
- Thank you received: 1
if($this->params->get('characteristic_display')!='list'){
//LAYOUT show_block_charasteristic
$this->setLayout('show_block_characteristic');
echo $this->loadTemplate();
?>
<br />
<?php
}
I moved this code up and under the price. Like this:
<div id="hikashop_product_description_main_mini" class="hikashop_product_description_main_mini">
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
<?php
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
if($this->params->get('characteristic_display')!='list'){
$this->setLayout('show_block_characteristic');
echo $this->loadTemplate();
?>
<?php
}
?>
The characteristics display where I want them to. However, when I click on a characteristic dropdown, like color or size, the characteristics disappear! They are just gone and I am unable to select color or size. What could cause this?
Please Log in or Create an account to join the conversation.
That's normal. The whole hikashop_product_price_main span's content is replaced by the content for the variant you select when you change a characteristic selection.
So you should actually put your characteristic block display code outside that span, a few lines below and it will work.
Please Log in or Create an account to join the conversation.