Forums / Customization from the Admin / Virtual product - don't want weight to be displayed

Virtual product - don't want weight to be displayed

Locked

Started by franck69 on 14 Jul 2008, 5:30 PM · Views: 1,427

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
14 Jul 2008, 5:30 PM
#1
franck69 avatar

franck69

New Zenner

Join Date:
Jun 2008
Posts:
35
Plugin Contributions:
0

Virtual product - don't want weight to be displayed

Hi,

Is there an easy way to make the weight in cart "Weight: 0kgs" not to be displayed when a product is virtual ?

:dontgetit

Thank's

17 Jul 2008, 2:24 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Virtual product - don't want weight to be displayed

If the shopping cart is all Virtual Products ... meaning it contains Products marked as either:
Virtual Products YES
Or, are Download Products
Or, a combination of both

You can use:
$_SESSION['cart']->get_content_type()

which will return 'virtual' for the content type in the shopping cart ...

This could be used in the template for the shopping cart via your overrides to show or not show the weight when the whole shopping cart is Virtual ...

If you want to suppress it when the weight is 0, then you could use:
$_SESSION['cart']->show_weight()

and when that is 0, your shopping cart contains 0 weight ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!