Skip to main content

"Choose Options" only appears if Characteristics

More
13 years 6 months ago #92984 by btbjosh
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.

More
13 years 6 months ago #92997 by nicolas
That has already been changed on our end for next version of HikaShop.
You would have to add the code
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.

More
13 years 6 months ago #93009 by btbjosh
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.

More
13 years 6 months ago #93011 by nicolas
Yes, you should leave it.

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

More
13 years 6 months ago #93014 by btbjosh
Thank you for the quick responses!

:) — Josh

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

Time to create page: 0.182 seconds
Powered by Kunena Forum