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

[eluser]haseydesign[/eluser]
@od3n

Checkout item example #117 on http://haseydesign.com/flexi-cart/lite_l...k_examples
When you're creating the array of item data to insert to the cart, you need to include the array key/value of 'unique' => true.
See this around line 235 of the included demo_cart_model.php file.

@Matthew Diggins

The 'x_array()', 'x_row_array()', 'x_row()' named versions of the library functions do not exist as actual code for any of the libraries functions.

Instead they use the PHP __call() method to create these alias function names that all utilise the 'x_query()' version of the function (Which is defined as actual code), and then apply CI's Active Records methods (eg $x->result_array()) to the 'x_query()' function.

For example, you will not find a function named 'get_db_shipping_array()' within the library code, however, there is a 'get_db_shipping_query()' function, which if you call 'get_db_shipping_array()', the __call() method with automatically create the alias for the function and apply CI's AR method to the function, essentially calling 'get_db_shipping_query()->result_array()'.

You can find the __call() method doing this at around line 38 of the Flexi_cart_lite.php library file.
You can also read a little more on this at http://haseydesign.com/flexi-cart/user_g...ql_results

I hope that helps you with your question.


Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 04-10-2013, 06:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB