Jump to content
thirty bees forum
  • 0

Cart rules / vouchers throw a database exception error for products with attributes -


Question

Posted

[Title and content edited after seeing different issues pop up and trying to separate them]

I created a cart rule with a product needing to match these conditions:

  • A certain attribute
  • A certain product
  • All customer groups

It has the action of applying the discount to the product of the attribute.

It gives me this error:

Unknown column ‘cp.idproductattrbute’ in ‘on clause’ SELECT cp.`quantity`, cp.`id_product`, pac.`id_attribute`, cp.`id_product_attribute` FROM `tb_cart_product` cp LEFT JOIN `tb_product_attribute_combination` `pac` ON cp.`id_product_attrbute` = pac.`id_product_attribute` WHERE (cp.`id_cart` = 481) AND (cp.`id_product` IN (70,57,41)) AND (cp.`id_product_attribute` > 0)

4 answers to this question

Recommended Posts

  • 0
Posted

OK, so it looks like there are two separate issues here:

  1. There is the originally reported issue of the first post.
  2. Then there is an error that vouchers weren't working because of conditions a customer group selection.

A friend took a look at the customer group error and he thinks the problem is:

SELECT crg.id_cart_rule FROM tb_cart_rule_group crg WHERE (crg.id_cart_rule = 7) AND (crg.id_group = = 1) LIMIT 1

--> the = 7 should probably be = = 7 See https://forum.thirtybees.com/topic/1161/cart-rules-vouchers-customer-group-restrictions-throw-an-error

  • 0
Posted

This is the error thrown by the first issue:

Unknown column 'cp.idproductattrbute' in 'on clause'

SELECT cp.`quantity`, cp.`id_product`, pac.`id_attribute`, cp.`id_product_attribute` FROM `tb_cart_product` cp LEFT JOIN `tb_product_attribute_combination` `pac` ON cp.`id_product_attrbute` = pac.`id_product_attribute` WHERE (cp.`id_cart` = 481) AND (cp.`id_product` IN (70,57,41)) AND (cp.`id_product_attribute` > 0)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...