-4

This is we are using at the backend to upload the product in to our website and when we click on the product page, we are getting error of Object of class stdClass could not be converted to string

Because of this we are not able to upload the products.

<td>
                                                        <?php
                                                          echo 'Rs. '.getFieldwhere('tbl_product_details','tbl_mrp','tbl_product_id',$product->id);
                                                          $price2  = getFieldwhere('tbl_product_details','tbl_selling_price','tbl_product_id',$product->id);
                                                          if(!empty($price2)) {
                                                            echo  "-".$price2;
                                                          }
                                                        ?>
                                                    </td>
                                                    <td> 
                                                        <?php echo  getFieldwhere('tbl_product_details','min_quantity','id',$product->id);?>
                                                    </td>

Once I have commented this code

echo 'Rs. '.getFieldwhere('tbl_product_details','tbl_mrp','tbl_product_id',$product->id);
                                                          $price2  = getFieldwhere('tbl_product_details','tbl_selling_price','tbl_product_id',$product->id);
                                                          if(!empty($price2)) {
                                                            echo  "-".$price2;
                                                          }

And we were able to upload a few products but then again in the next line we got the same issue.

  • Can you add the function body of `getFieldwhere()`, So I can understand what type of data return by this function – Yogendra Aug 29 '23 at 05:28

0 Answers0