- Posts: 90
- Thank you received: 1
"Choose Options" only appears if Characteristics
13 years 6 months ago #92984
by btbjosh
— Josh
"Choose Options" only appears if Characteristics was created 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?
Is this a bug? Why would the "paid options" not trigger this "choose options" requirement?
Please Log in or Create an account to join the conversation.
13 years 6 months ago #92997
by nicolas
Replied by nicolas on topic "Choose Options" only appears if Characteristics
That has already been changed on our end for next version of HikaShop.
You would have to add the code
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.
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;
}
}
}
}
Please Log in or Create an account to join the conversation.
13 years 6 months ago #93009
by btbjosh
— Josh
Replied by btbjosh on topic "Choose Options" only appears if Characteristics
Thanks, That did the trick.
To make sure though... I did leave the variant query code as well... That is ok right?
To make sure though... I did leave the variant query code as well... That is ok right?
Please Log in or Create an account to join the conversation.
13 years 6 months ago #93011
by nicolas
Replied by nicolas on topic "Choose Options" only appears if Characteristics
Yes, you should leave it.
Please Log in or Create an account to join the conversation.
13 years 6 months ago #93014
by btbjosh
— Josh
Replied by btbjosh on topic "Choose Options" only appears if Characteristics
Thank you for the quick responses!
Please Log in or Create an account to join the conversation.
Time to create page: 0.182 seconds