Related products module

  • Posts: 59
  • Thank you received: 0
14 years 1 month ago #1221

I have another issue for you, sorry :).

I created a module at the left part of the page. This module has been configurated to display Related products to the ones which are being shown.
I set it up this way:
Sub elements filter = all sub elements
Parent Category = the same as products involved here.
Content on product page = related products

Also, i related two products between them, bidirectionally. "Camisa verde" is related to "pantalon Rojo" and vice versa (I don´t know it this is strictly necessary).

You can see how in both products page, the other has not been shown at the module.
shoptest.avaray.com/es/component/hikasho...o/category_pathway-0
shoptest.avaray.com/es/component/hikasho...e/category_pathway-0

To make things a bit more complicated, if you go to the site main page, you will find the Related products module fullfilled with products.... related to what?

I guess that i have lost something in my way here :D

Last edit: 14 years 1 month ago by Avaray. Reason: Sintaxys

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
14 years 1 month ago #1224

You need to have the content synchronization option to yes. Maybe that could explain the problem ?

For the fact that the module displays stuff on other pages, well that's the normal behavior of the module. When you don't display a product page, the module displays the elements of the category selected in the options as parent category. If you don't want it to do that, just put there a category with nothing in it. Otherwise, put the module in the "under the product page" option so that it's displayed only there.

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

  • Posts: 59
  • Thank you received: 0
14 years 1 month ago #1226

If you refer to "Synchronize with currently
displayed item when possible", it was on "yes" already.

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
14 years 1 month ago #1230

There seems to be a bug in the query loading the related products when the ordering column is selected and that the random option is turned off in the options of the module.

If you change the code

$on = ' ON a.product_related_id=b.product_id';
by the code
$on = ' ON a.product_related_id=b.product_id';
									if($this->params->get('product_order')=='ordering'){
										$pageInfo->filter->order->value = '';
									}
in the file components/com_hikashop/views/product/view.html.php near line 55, that should solve the problem.

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

  • Posts: 59
  • Thank you received: 0
14 years 1 month ago #1231

In this line the code is other. Very similar, but another one:

$on = ' ON b.product_related_id=a.

The "a" and "b" variables (or whatever they are) are misplaced.

Please, confirm your fix. I have no idea about programming. :)

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
14 years 1 month ago #1232

I confirm that the modification is the good one even when a and b are inverted (a bug which was corrected by the latest version yesterday).

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

  • Posts: 59
  • Thank you received: 0
14 years 1 month ago #1235

Again, an excellent support.

I am starting to feel myself as an official Hikashop tester :D.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum