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
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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.