Can´t change product layout

  • Posts: 5
  • Thank you received: 1
10 years 4 months ago #201692

-- HikaShop version -- : 2.4.0. Starter
-- 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.

  • Posts: 5
  • Thank you received: 1
10 years 4 months ago #201713

One little advance: If I modify view show_tabular, changes take place, so that´s the file the system is reading.
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.

  • Posts: 84304
  • Thank you received: 13699
  • MODERATOR
10 years 4 months ago #201741

Hi,

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.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 4 months ago #201704

Hi,

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_default" for example.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 5
  • Thank you received: 1
10 years 4 months ago #201795

Thank you Jerome and Nicolas!!!

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
10 years 3 months ago #203067

Goerg,

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.

  • Posts: 5
  • Thank you received: 1
10 years 3 months ago #203075

As you said, is very frustrating.
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.

The following user(s) said Thank You: ahacreative

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

  • Posts: 49
  • Thank you received: 1
10 years 3 months ago #203077

Well, I finally found the code to move the Add to Cart and Wishlist Buttons up. That worked! Do you have any idea which lines of code control the Characteristics selectors?

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

  • Posts: 5
  • Thank you received: 1
10 years 3 months ago #203079

No, no need to change that for me

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 3 months ago #203081

Hi,

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 49
  • Thank you received: 1
10 years 3 months ago #203141

Jerome,

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.

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #203144

Hi,

To move the show_block_characteristic part in the show_tabular view, you just have to move the code:

	if($this->params->get('characteristic_display')!='list'){
		//LAYOUT show_block_charasteristic
		$this->setLayout('show_block_characteristic');
		echo $this->loadTemplate();
		?>
		<br />
		<?php
	}
This code call the the view "show_block_characteristic" inside the "show_tabular" one. ;)

The following user(s) said Thank You: ahacreative

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

  • Posts: 49
  • Thank you received: 1
10 years 3 months ago #203242

Xavier,

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
10 years 3 months ago #203560

Ok. I have one more problem with the characteristics. I am working on localhost via MAMP to do some design edits, so this isn't live yet. When I move this code:

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.

  • Posts: 84304
  • Thank you received: 13699
  • MODERATOR
10 years 3 months ago #203569

Hi,

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.

Time to create page: 0.096 seconds
Powered by Kunena Forum