Hide free items from cart and invoice?

  • Posts: 156
  • Thank you received: 0
13 years 2 months ago #26157

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.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 2 months ago #26160

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.

  • Posts: 156
  • Thank you received: 0
13 years 2 months ago #26169

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.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 2 months ago #26170

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.057 seconds
Powered by Kunena Forum