Related Products before text on product page

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 2 weeks ago #73384

I would like the related products to display before the text on a product page as per this image. I realise it can be achieved with a content module inserted into the description but would prefer the change in the template itself.



I did manage to find the following code in the product show template but I am not quite sure where to add it to achieve my aims.

<div class="hikashop_submodules" id="hikashop_submodules" style="clear:both">
    <?php
if (!empty ($this->modules) && is_array($this->modules)) {
  jimport('joomla.application.module.helper');
  foreach ($this->modules as $module) {
    echo JModuleHelper :: renderModule($module);
  }
}
?>
  </div>

Thanks


Dave

Attachments:

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 2 weeks ago #73447

I have managed to sort the initial issue I believe by customising the view product >> show_default.

I now have another issue though with IE9. The layout is effectively broken. The image below shows what has happened. it should look the same as the firefox layout.

Oddly at the bottom of the page after the description the products line up correctly, the third image.





Attachments:

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 2 weeks ago #73777

Hi,

We would need a link to that page and to know what exact modification you did to be able to help you.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 1 week ago #73829

Hi Nocholas one of the pages is here www.acorntraps.co.uk/site2/products/trap...toclay-300-clay-trap the site.

I took the code from show.php and aded it to show_default.php

I am not quite sure if that is the way to do it and would appreciate your comments

Thanks

Dave B)

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 1 week ago #74092

This means that you have a ending HTML tag either missing or too much.
It definitely comes from the customization you made.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 1 week ago #74148

Nicolas

thanks for the reply. I have now removed the customisations and inserted the related products module into the description area of the product. The layout issue is still happening?

The add to cart buttons were not shown originally within the related products but Mohamed Thelji added some css to a style sheet

.hikashop_product_quantity_main .hikashop_product_stock  .button {

background-image: url(../images/add-to-cart.jpg);

background-repeat:no-repeat;

width: 141px;

height: 29px;



}

#hikashop_module_116 .hikashop_product_stock .button {

  background-image:  url(../images/add-to-cart.jpg);

  background-repeat:no-repeat;

  width: 141px;

  height: 29px;
color: #000;

}

#hikashop_module_160 .hikashop_product_stock .button {

  background-image:  url(../images/add-to-cart.jpg);

  background-repeat:no-repeat;

  width: 141px;

  height: 29px;
color: #000;

}

I also removed this styling but the issue was not resolved.

I have also tried this with the default Joomla templates and the layout problem is also present using these.

Dave B)

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 1 week ago #74394

I have no other idea. It of course works fine on our end so besides something on your website doing that I don't see why ?
Maybe one of the content plugins could be the culprit ? You could try to deactivate them one by one to see if it comes from one of them.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 1 week ago #74686

Nicolas

Are you telling me the layout is correct on your PC? The issue is the same with on my clients PC too. I removed the install and re-installed Hikashop 2.0 using the default template.

Using the IE9 developer tools I notice that column 1 row 1 is listed 2 times. I have attached a screenshot which I hope will provide a clearer indication of the problem.

<div class="hikashop_product hikashop_product_column_1 hikashop_product_row_1" style="width: 32%;">
also repeated again further down.
<div class="hikashop_product hikashop_product_column_1 hikashop_product_row_1" style="width: 32%;">
<div class="hikashop_product hikashop_product_column_2 hikashop_product_row_1" style="width: 32%;">
<div class="hikashop_product hikashop_product_column_3 hikashop_product_row_1" style="width: 32%;">




I would appreciate further feedback on this?

Thanks

Dave

Attachments:

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 1 week ago #74907

No it doesn't work for your website too. I'm saying that with similar listings on other websites we don't have that problem with IE.

The fact that you have the HTML twice means that the parser of IE is not able to parse properly the HTML near that place. That usually indicates a problem with the HTML which is not correct. That's why I had told you that it's probably an HTML tag missing.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 1 week ago #74928

My understanding is that Hikashop appears to be generating the tag. I have tried different templates and the problem is still there. I have another small site using Hikashop. I will duplicate that site and see if the issue still arises.

Dave B)

Last edit: 12 years 1 week ago by davec.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 4 days ago #75881

I have now tried this on another site with the same result as previously mentioned.

I could really do with some kind of clarity on this problem including which files I can alter in Displays >> Views to achieve my objective. :unsure:

This happens on all templates but in IE9 compatibility mode the page displays correctly although without the rounded corners.

I have carried out the usual tests including switching off all modules and plugins and this has not made any difference. All a little frustrating to say the least!!

Dave B)

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 4 days ago #75977

As a further update I have made a fresh installation this afternoon and used a standard Joomla template. The IE9 problem still occurs. I have made no changes to the templates in either Hikashop or Joomla. I have even removed the tabbed content.

Dave B)

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 3 days ago #76178

If it was coming from HikaShop, you would have the same problem with all the products listings. However, On your pages, the only place where you have it is the listing that you added inside your description.

I see that you're using module anywhere to include your listing inside the description. So maybe it comes from that.

Why not instead move the code loading the module from the end of the product/show.php template that you had posted earlier to before the line:
<div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part">
in the product/show_default.php view file ? That way, you would have the modules on the product page display before the description like you want without using modules anywhere and I'm hopeful that it would help avoid that issue on IE.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 2 days ago #76241

Nicholas

I have tried this and the result is the same. :(

At a total loss, I been told it is the same in IE8, I will check that tomorrow morning, when I start uo my older PC.

It appears to me that the column 1 row 1 is being generated twice. The second one is then empty because the first one has been populated with a product.

Is there any other code I should be moving beside what you have suggested?

Dave B)

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 2 days ago #76358

Would you be able to adivise on how the page is constructed?

I notice within the product/listing_div.php there are 3 divs highlighted in red. Now this may well tie up with the rest of the templates and is just a thought. I had hoped to launch this site by the weekend and this is the only stumbling block.

<li class="span<?php echo $span; ?> hikashop_product hikashop_product_column_<?php echo $current_column; ?> hikashop_product_row_<?php echo $current_row; ?>">
        <div class="hikashop_container">
          <div class="hikashop_subcontainer <?php echo $this->borderClass; ?>">
<?php
        }

        $this->row =& $row;
        $this->setLayout('listing_'.$this->params->get('div_item_layout_type'));
        echo $this->loadTemplate();

        if(!HIKASHOP_J30) {
?>
          </div>
        </div>
      [color=#ff0000]</div>[/color]
<?php
        } else {
?>
         [color=#ff0000] </div>
        </div>[/color]
      </li>

Thanks

Dave

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
12 years 1 day ago #76555

Hi,

A part is used for Joomla 1.5/2.5 and the other part for Joomla 3.0
All content in "if(!HIKASHOP_J30) { ... } " is for Joomla 1.5 and 2.5, content in the "else { ... }" is for Joomla 3.0
The two versions gives different HTML data because Joomla 3.0 have responsive design.

So, in the three red "div" in your code, just the first one is really displayed in your website (and the two "div" just before its).

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: 440
  • Thank you received: 20
  • Hikashop Essential
12 years 1 day ago #76612

Thanks for the reply Jerome. Seems that I am still searching for the reason of why the layout breaks in IE9 :S

Dave B)

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

Time to create page: 0.107 seconds
Powered by Kunena Forum