Post by tronics » Wed Jul 15, 2009 5:10 pm

Hello!

I'm trying to evaluate if open Cart is the right solution. I have been searching in the forum, but I didn't find answers to the most important questions I have:

-) How to add additional fields to the product & the admin product list?

-) How to add additional fields to the order & the admin order list?

-) Can I make this cart "login-only" so only a certain group of users can see products? Or are the groups for backend access only?

-) Can I make certain groups of users see certain products/categories?

Thanks.

Regards,
tronics

Newbie

Posts

Joined
Wed Jul 15, 2009 5:05 pm

Post by tronics » Sat Jul 18, 2009 12:38 am

>login only

resolved here:
http://forum.opencart.com/viewtopic.php ... 857#p23857

certain groups of clients not yet..

Newbie

Posts

Joined
Wed Jul 15, 2009 5:05 pm

Post by readyman » Sat Jul 18, 2009 12:41 am


http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by tronics » Sat Jul 18, 2009 4:38 am

Thank you.

Newbie

Posts

Joined
Wed Jul 15, 2009 5:05 pm

Post by trevor » Tue Jul 21, 2009 11:43 pm

Tronics,

I've only been playing with Open Cart for a few weeks so my word isn't gospel on the subject. I have however managed to add additional fields to both the 'product' and 'categories' tables and get OC to use them! I have a lot of additional information I needed to stored per product such as a part_no, storage_ref, etc. At the moment the only way I could see to extend this was to manually edit the php sources and alter the sql tables with the new fields. Thankfully this isn't as difficult as in other cart frameworks since the code for OC is very small, this still requires good php and sql skills however so its not for everyone.

The first way i did it was to add the fields and then extend the MVC (Model, View, Controller) php code. I had to do this in two places, one the shop itself and secondly in the admin interface. This way you can edit the new fields properly from the admin interface without having to manually edit the database via something like phpadmin.

Initially I added all my new fields directly into the 'oc_products' sql table an the 'oc_categories' sql table. This worked fine but unfortunately this approach isn't so easy to later slipstream the changes back into new releases of Opencart (which are pretty frequent) since its difficult to remember which was original code and which was my code.

... So the alternative (easier) way is to create a completely new pair of tables and seperate out access to them tables into your own php files. You can do this by creating 'oc_products_extra' and 'oc_categories_extra'. You can then match them up using same unique primary key, unsurprisingly for products this is 'product_id' and for categories this is 'category_id'.

I think it would be nice in the future to have some addtional personalisation fields (e.g. added the way the config parameters are done perhaps Daniel?) directly supported so no source-code hacking is required to add additional fields per product. This is probably one of the most sort after features on most carts.

Newbie

Posts

Joined
Mon Jul 20, 2009 9:13 pm
Who is online

Users browsing this forum: No registered users and 75 guests