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

[eluser]haseydesign[/eluser]
@koichirose

Its getting late night here now so I'll leave the number calculations answer for another night.

However, regarding setting discounts per item brand, category and user group, you can do this with the current setup by using the previously mentioned 'disc_group_fk' column for items and the 'custom_status_x' column for the user group.

I know when you first think that if you create item groups, you will then need to add each item one by one to the table where the item brand = 'xyz'.
However, by using the also mentioned 'custom_sql_admin()' function, you can easily create SQL queries that would add all items where the brand = 'xyz' AND the category = 'Category C'.
Then combining this generated SQL WHERE query with the 'insert_db_discount_group_item()' function, you can very easily add as many items as you require to your item groups.

Checkout the quoted links below if you want further info.

Quote:http://haseydesign.com/flexi-cart/user_g...ount_group
http://haseydesign.com/flexi-cart/user_g...group_item

A demo of adding items to a discount group using a custom SQL WHERE builder can be found at:
http://haseydesign.com/flexi-cart/admin_...up_items/1
http://haseydesign.com/flexi-cart/user_g..._sql_where

You could try the method of adding you own custom columns (Or by just using the 3 'custom_column_X'), but I really don't see the need as the functionality is there, just not quite as simply as you want/expect it to be.

Its designed this way specifically to try to offer a flexible enough solution that whilst not being the ideal layout, it can be used by users with many different cart database schemas.

---------------------------------------------------------------------------------------------------

Regarding the location table, I would need to think it over a bit more about how you could join your 3rd party table. However, the location tables really are quite core to the functionality of many features within the cart (Shipping, tax, item shipping rates, item tax rates, discounts etc.), so I don't fancy you chances of a quick fix.



Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 11-15-2012, 05:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB