Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Disable price in the shopping cart?

Disable price in the shopping cart?

Locked

Views: 1,274

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
6 Feb 2008, 3:35 PM
#1
venera15 avatar

venera15

New Zenner

Join Date:
Jan 2008
Posts:
47
Plugin Contributions:
0

Disable price in the shopping cart?

I have enabled the shopping cart sidebox, but is there anyway to disable it from showing the price? I will use the quantity discount which only shows at the end of the checkout processso i don't want to discourage people looking at a price that is not right (too high)?

6 Feb 2008, 3:50 PM
#2
lizzyb avatar

lizzyb

New Zenner

Join Date:
Jan 2008
Posts:
34
Plugin Contributions:
0

Re: Disable price in the shopping cart?

Hi - I also want to do this as Im building a 'shop' which is actually for a modelling agency and Im using the 'cart' as a 'shortlist'. So i dont want any prices either.

I shall be watching the thread for an answer :smile:

6 Feb 2008, 5:47 PM
#3
venera15 avatar

venera15

New Zenner

Join Date:
Jan 2008
Posts:
47
Plugin Contributions:
0

Re: Disable price in the shopping cart?

hi lizzy, i think i found it.

includes/templates/template_default/sideboxes/tpl_shopping_cart.php

look for this code
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '<hr />';
$content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
$content .= '<br class="clearBoth" />';
}

and delete
$content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
that should do it....

6 Feb 2008, 7:03 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Disable price in the shopping cart?

Just be sure to save your modified file as /includes/templates/your_template/sideboxes/tpl_shopping_cart.php, so that your changes will not be erased when you upgrade to the next version of Zen Cart. Never change the files in /template_default/.

If you don't have a custom template yet, look in the FAQs for information on making one.

7 Feb 2008, 9:40 AM
#5
lizzyb avatar

lizzyb

New Zenner

Join Date:
Jan 2008
Posts:
34
Plugin Contributions:
0

Re: Disable price in the shopping cart?

Thats great - worked fine (i actually deleted the block to remove the hr and everything)

I would like to also remove the code showing 1ea (ie the quantity)but I cant figure out how to remove this - i can see the quantity code in the PHp file but im not sure exactly where i should start and stop the removal as I want the product name leaving in. I have experiemented but seem to be getting some unpredictable results eg I got the number to go but the ea remained. I got the 1ea to go but then the whole information box below vanished!

Any ideas?

Thanks
Liz

7 Feb 2008, 10:17 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Disable price in the shopping cart?

Edit this code:```php
$content .= '<li>';

  if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
    $content .= '<span class="cartNewItem">';
  } else {
    $content .= '<span class="cartOldItem">';
  }

  $content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . '</span><a href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">';

to readphp
$content .= '<li>';

  $content .= <a href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">';
7 Feb 2008, 10:49 AM
#7
lizzyb avatar

lizzyb

New Zenner

Join Date:
Jan 2008
Posts:
34
Plugin Contributions:
0

Re: Disable price in the shopping cart?

hey thanks - it didnt work straight away then I realised there was ' missing at the start and end of the second line. Now works a treat and also helped me debug a bit of code (learning quickly!)

Thanks for your time :smile: