Skip to main content

Hide free items from cart and invoice?

More
15 years 6 days ago #26157 by Rickhavoc
i got a couple options on some items. Even if the option has no price it gets added to the cart.. i would like to hide any options with no cost that end up in the cart. How can i achieve this with the hikashop?

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

More
15 years 6 days ago #26160 by nicolas
You can edit the file cart of the views product and checkout and the file show and invoice of the view order via the menu Display->Views. There, in the for or foreach which displays the products, you can add a check to skip the free products.
Something like that (the variable name might be different in some cases):
if(empty($row->prices)) continue;

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

More
15 years 6 days ago #26169 by Rickhavoc
i am having trouble locating the line to insert the code you gave me.. Could elaborate a bit more?


Thanks,

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

More
15 years 6 days ago #26170 by nicolas
Foreach for the cart file of the view checkout, it's after the line:
foreach($this->rows as $i => $row){
That file is for the cart display on the checkout.

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

Time to create page: 0.161 seconds
Powered by Kunena Forum