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

[eluser]haseydesign[/eluser]
@Valcsi

There are a few points that I need to confirm you are aware of.

You say that if order numbers are incremental, that other users would be able to simply enter an order number into the url to get specific details of an order - including email addresses.

You need to ensure that these pages are not accessible to unauthorised users. Only users that have logged in as an admin should be able to see all orders, and customers should only be able to see order details for their own orders.

If an unauthorised user should enter a valid url to view someone else's order, they should not be shown the order details. This functionality needs to be provided by your user authentication library - may I plug my own flexi auth library if you're interested.

The security of the order details is not compromised by having incremental order numbers provided you follow the steps outlined above. However, it is also possible to generate random order number or to even define you own.

Define the flexi cart to generate random order numbers by setting the following config setting via the flexi cart config file.
Code:
$config['defaults']['configuration']['increment_order_number'] = false;

You can alternatively define this via the 'cart_config' database table and 'increment_order_number' column.

To define your own order number, you can define it when saving the rest of the order via the 'order_number' argument on the 'save_order()' function.
http://haseydesign.com/flexi-cart/user_g...save_order

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

Regarding not being able to retrieve the email address within an order details, first ensure that the data is being saved to the database in the 'order_summary' table.

If the data isn't being saved, review the code within the demo for the 'demo_save_order()' method within the 'model/demo_cart_model.php' file for saving custom order data.

If the data just isn't being returned, review the code within the demo for the 'order_details()' method within the 'controller/admin_library.php' file for getting saved order data.

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

Finally regarding saving items into multiple different carts, I can't say I've ever come across a need to do this. However, I guess you could probably use the libraries load/save cart feature to achieve something like what you're after.

You can see a demo of this at http://haseydesign.com/flexi-cart/standa..._cart_data

Hope that all helps


Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 11-14-2012, 02:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB