- Posts: 156
- Thank you received: 0
Hide free items from cart and invoice?
15 years 6 days ago #26157
by Rickhavoc
Hide free items from cart and invoice? was created 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.
15 years 6 days ago #26160
by nicolas
Replied by nicolas on topic Re: Hide free items from cart and invoice?
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;
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.
15 years 6 days ago #26169
by Rickhavoc
Replied by Rickhavoc on topic Re: Hide free items from cart and invoice?
i am having trouble locating the line to insert the code you gave me.. Could elaborate a bit more?
Thanks,
Thanks,
Please Log in or Create an account to join the conversation.
15 years 6 days ago #26170
by nicolas
Replied by nicolas on topic Re: Hide free items from cart and invoice?
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.
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