1

When I tried to add product from product details page, it showing a popup message

'Can not add this item to the shopping cart'.

Then when I go to list page it showing a MySQL violation error message.

=> I tried to rename local.xml file and again install a magento with same database.

=> Used database repair tools

=> changed php.ini memory limit values.

=> Update all products and it's attribute

But still facing same issue, Can you please suggest me what exactly happen?

Product detail page link : https://boilerplatecodes.com/laminath/zrich-40805.html

8
  • Please check system.log file if there is any error regarding this – Rakesh Varma Nov 1 '18 at 5:07
  • Try switching to default theme? – Haim Nov 1 '18 at 5:09
  • The problem only happens once you try adding something to cart and the theme tries to render the mini cart. So my guess is you have something wrong with your theme – Haim Nov 1 '18 at 5:12
  • Yes trying to default theme, it's work fine on default theme – Shesh Nov 1 '18 at 5:22
  • Can you post content of /app/design/frontend/smartwave/laminaat/template/checkout/cart/minicart/default.phtml – Haim Nov 1 '18 at 5:29
0

Start by removing all this code.

$query = "select `catalog_product_option_type_price`.`option_type_price_id`,    `catalog_product_option_type_price`.`option_type_id`,   `catalog_product_option`.`option_id`,   `catalog_product_option`.`product_id`,  `catalog_product_option`.`type`,    `catalog_product_option_type_value`.`sku`,  `catalog_product_option_type_price`.`price` from `laminaatspecialist`.`catalog_product_option`,`laminaatspecialist`.`catalog_product_option_type_price`,`laminaatspecialist`.`catalog_product_option_type_value` where `catalog_product_option`.`option_id` = `catalog_product_option_type_value`.`option_id` AND `catalog_product_option`.`product_id` = ".$productId." AND `catalog_product_option_type_value`.`option_id` = ".$optionId." AND `catalog_product_option_type_value`.`option_type_id` = `catalog_product_option_type_price`.`option_type_id`";      $results = $readConnection->fetchAll($query);       foreach($results as $result){           if($checkcat){              echo $option['label'] . ': ' .number_format((float)$result['price'], 2, '.', '')." cm";                 if($storeval == 'english'){                     echo $option['label'] . ': ' .number_format((float)$result['price'], 2, '.', '')."1 cm";                }           }else{              echo $option['label'] . ': ' .number_format((float)$result['price'], 2, '.', '')." m²";            }       } }
1
  • It looks like you have same garbage queries in /app/design/frontend/smartwave/laminaat/template/checkout/cart/item/default.phtml – Haim Nov 1 '18 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.