"Choose Options" only appears if Characteristics

  • Posts: 90
  • Thank you received: 1
11 years 8 months ago #92984

I have a product that has paid options and when it appears in the submodules for Related products it doesn't display "Choose Options" instead of Add to cart. It appears that this "choose options" button only appears if there are characteristics in the product. This is bad because I need the customer to choose the options for this product before they add it to cart, but I don't have any free variants to trigger this button change.

Is this a bug? Why would the "paid options" not trigger this "choose options" requirement?


:) — Josh

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
11 years 8 months ago #92997

That has already been changed on our end for next version of HikaShop.
You would have to add the code

$database->setQuery('SELECT * FROM '.hikashop_table('product_related').' WHERE product_related_type = '.$database->quote('options').' AND product_id IN ('.implode(',',$ids).')');
			$options = $database->loadObjectList();
			if(!empty($options)){
				foreach($rows as $k => $product){
					foreach($options as $option){
						if($product->product_id==$option->product_id){
							$rows[$k]->has_options = true;
							break;
						}
					}
				}
			}
before the line $currencyClass->getListingPrices($rows,$pageInfo->zone_id,$pageInfo->currency_id,$pageInfo->filter->price_display_type); in components/com_hikashop/views/product/view.html.php to get the fix.

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

  • Posts: 90
  • Thank you received: 1
11 years 8 months ago #93009

Thanks, That did the trick.

To make sure though... I did leave the variant query code as well... That is ok right?


:) — Josh

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
11 years 8 months ago #93011

Yes, you should leave it.

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

  • Posts: 90
  • Thank you received: 1
11 years 8 months ago #93014

Thank you for the quick responses!


:) — Josh

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

Time to create page: 0.056 seconds
Powered by Kunena Forum