Button Next Product Missing

  • Posts: 66
  • Thank you received: 3
11 years 5 months ago #77816

Hi,

On some product pages I am missing the next button. Example link: http://www.1968dewinkel.nl/tilda/overige/product/100-houten-klossen

It happens when the products are set for different Hikashop categories. As I read from the documentation that is a feature of Hikashop or am I missing something here?

What happens is if product X in this example is followed by product Y from another category the right next button is missing. Is this a bug that has been solved in version 2.0.0?

See example. This product is followed by another product that has been assigned to more Hikashop product categories.

(Note: as I am reading my post I see that I have made the wrong screen prints - it is actually happening after product 5 in the row - screenprint no. 2 but hope my questions is still clear)







Attachments:
Last edit: 11 years 5 months ago by didero. Reason: note added

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #77866

Hi,

Yes, there is a problem here. Could you give us a backend access ?
Or try to edit the file "components/com_hikashop/views/product/view.html.php" and in the function "show()" the request to have the next and previous products is there.

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

  • Posts: 66
  • Thank you received: 3
11 years 5 months ago #77904

Xavier, thank you. I will set up a backend access and send you the details by email.
I only changed that view to show dutch translations for "next" and "previous" products.

<?php
/**
* @package HikaShop for Joomla!
* @version 1.6.0
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
* ===============================================================
* views - product - show - "VORIG" en "VOLGEND ARTIKEL"
* ===============================================================
*/
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_product_<?php echo @$this->element->product_code; ?>_page" class="hikashop_product_page">
<?php
$app = & JFactory :: getApplication();
if (empty ($this->element)) {
$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
} else {
if(!empty($this->links->previous))
echo "<a alt='Vorige Artikel' title='Vorig Artikel' href='".$this->links->previous."'><span class='hikashop_previous_product'></span></a>";
if(!empty($this->links->next))
echo "<a alt='Volgende Artikel' title='Volgend Artikel' href='".$this->links->next."'><span class='hikashop_next_product'></span></a>";
echo "<div class='clear_both'></div>";
?>

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #78091

Hi,

I can't reproduce the problem on my end and the problem come from the file "components/com_hikashop/views/product/view.html.php".
Could you give us a FTP access ?

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

  • Posts: 66
  • Thank you received: 3
11 years 5 months ago #78115

Xavier, thank you again. I will send you the details by email.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #78418

Hi,

I solved the problem for this product. But I think that it will happen for other products too.
The problem is that the product has many categories affected, and this system take the first returned category, and for this product the first returned category wasn't the category with the id 118.
But the category 77, and in the category 77 it's the last product, that's why there wasn't the next button.

What you can do is order the categories affected to the product on the product edition page, to be sure that it will link to the product of his main category.

Last edit: 11 years 5 months ago by Xavier.

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

  • Posts: 66
  • Thank you received: 3
11 years 5 months ago #78427

Hi Xavier,

Thank you. Indeed there are other products where the same happens e.g. products assigned to two or more categories followed by a product from yet another category. I already thought that is causing this to happen.
How did you solve it?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #78438

What you can do is order the categories affected to the product on the product edition page, to be sure that it will link to the product of his main category.


Or, edit the file "components/com_hikashop/product/view.html.php"

And add the code:
if($product_id == 108) $category_id = '223';
Before:
			if(empty($category_id)){
				$query='SELECT a.category_id FROM '.hikashop_table('product_category').' AS a WHERE a.product_id='.(int)$product_id.' ORDER BY a.product_category_id ASC';
				$database->setQuery($query);
				$category_id = $database->loadResult();
			}

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

Time to create page: 0.098 seconds
Powered by Kunena Forum