Jump to content

Variable with changing Value


crisspoll

Recommended Posts

Hi there,

 

I'm pretty new to PHP programming so I'm not sure if I can explain my problem in a proper way.  I'm running Joomla 1.5 with Joomshopping and in my shoppincart I added weights for every product. Now I want to display a text in case one of the products has the weight "0". If I do that with <?php if ($this->.....  the text does not show as soon as there is one product with weight ">0". How can I define that the text is shown if the variable "weight" is "0" in one case, regardless that the same variable has a higher value before or after.

 

Thanks in Advance.

 

crisspoll

Link to comment
https://forums.phpfreaks.com/topic/250032-variable-with-changing-value/
Share on other sites

Maybe it helps if I add the code I mean:

 

This is where the roduct weight comes from:

 

<td>

    <?php print formatweight($prod['weight']*$prod['quantity']);?></span> <?php print _JSHOP_WEIGHT_UNIT ?>

...

 

Now this value is there for each item in the cart. I would like to check if the value is "0" for one item. Anybody out there who has an idea?

 

Thanks

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.