Welcome Guest, Not a member yet? Register   Sign In
flexi cart - A comprehensive shopping cart library for CodeIgniter

[eluser]Unknown[/eluser]
I am receiving a database error whenever I use an item_id with non-numeric values. I have demo installed to make sure it wasn't my code. I updated flexi_cart config to allow for non-numeric (per user guide) however if i use something like abc101 it will tell me:

Error Number: 1054
Unknown column 'abc101' in 'where clause'
SELECT `disc_group_item_item_fk` AS item_id, `disc_group_fk` AS group_id, `disc_id` AS id, `disc_column_id` AS column_id, `disc_calculation_id` AS calculation_id, `disc_code` AS code, `disc_description` AS description, `disc_quantity_required` AS quantity_required, `disc_quantity_discounted` AS quantity_discounted, `disc_value_required` AS value_required, `disc_value_discounted` AS value_discounted, `disc_recursive` AS recursive, `disc_custom_status_1` AS custom_status_1, `disc_custom_status_2` AS custom_status_2, `disc_custom_status_3` AS custom_status_3, `disc_non_combinable_discount` AS non_combinable, `disc_void_reward_points` AS void_reward_points, `disc_force_ship_discount` AS force_shipping_discount, `disc_tax_method_fk` AS tax_method FROM (`discounts`) JOIN `discount_methods` ON `disc_method_fk` = `disc_method_id` JOIN `discount_columns` ON `disc_method_column_fk` = `disc_column_id` JOIN `discount_calculation` ON `disc_method_calculation_fk` = `disc_calculation_id` LEFT JOIN `discount_groups` ON `disc_group_fk` = `disc_group_id` LEFT JOIN `discount_group_items` ON `disc_group_id` = `disc_group_item_group_fk` WHERE `disc_valid_date` <= '2014-02-27 16:43:01' AND disc_expire_date >= '2014-02-27 16:43:01' AND disc_status = 1 AND disc_usage_limit > 0 AND ((disc_locati AND disc_z AND (disc_group_item_item_fk IN (101,abc101) AND disc_group_status = 1) ORDER BY `disc_order_by` ASC, `disc_location_fk` ASC, `disc_zone_fk` ASC
Filename: /web dev/ci.local/models/flexi_cart_model.php
Line Number: 2725

Using 101 works fine. I think the mysql has error at "(disc_group_item_item_fk IN (101,abc101)" there should be single ticks like ('101','abc101'). Looking throught flexi_cart_model I am having hard time finding what to update to fix this.

Anyone else have the same problem or a fix?

Thanks


Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 02-27-2014, 03:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB