New Zenner
- Join Date:
- Sep 2007
- Posts:
- 36
- Plugin Contributions:
- 0
Post #1 by hauruapai
Hi,
I am doing a shop where there will be a certificate of Authenticity issued if the price of the product is over $100.00 and want the information to show automatically on the product info page.
I have tried this ```php
<?php $main_price = zen_get_products_display_price((int)$_GET['products_id']); echo $main_price; If ($main_price >= 10.00) { echo TEXT_CERT_AUTHENTICITY ; } ?>However, it is not showing anything. I have tested that $main_price is giving the correct price for the product. I have also tested that TEXT_CERT_AUTHENTICITY can be written correctly.
I have viewed products that are over 10.00 and they are not showing the extra text. I have also tested with viewing products under 10.00 and still get nothing.
However, if I change it to $main_price <= 10.00 then the TEXT_CERT_AUTHENTICITY will show if the product is OVER $10.00 but if the product is less than 10.00 it will not show the TEXT_CERT_AUTHENTICITY
Ok, so it is doing what I want it to do, but I would like to understand why the <= (less than or equal to) gives greater than or equal to results and the >= gives less than or equal to results.
What am I doing wrong? I am not really familiar with php only asp.
Thank you!