how can I compute the product between these 2 quantities in php ?
This is what I’ve tried, but it doesn’t work
<?php echo (uc_price($price_info, $context) * $product->qty); ?>
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Does uc_price($price_info, $context) and $product->qty return a integer? its more likely that uc_price($price_info,$context) return a array, object or something else. make sure it return a integer.
Also its better to cast those value into integer/float before multiplication e.g:
or cast them to float(price is more likely to be float: