PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Fri Jul 03, 2020 2:00 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 06, 2011 4:05 pm 
Forum Newbie

Joined: Wed Jan 19, 2011 11:04 pm
Posts: 6
I have a webapp thats works sort of like a shopping cart (only the products are to build a phone system configuration)

I have a display class that builds product objects and stores them in an array. I then update the product display (amounts, errors etc) then finally display them.


Syntax: [ Download ] [ Hide ]
$this->items['pcvs300'] = new ItemClass("pcvs300","Polycom Voice Station 300","2200-17900-013");
$this->display_handsets .= $this->items['pcvs300']->get_display();

//(i then return $this->display_handsets along with other categories to an ajax response page to build the web app)


I lease this site, it has a couple of dozen reseller accounts now and growing.
Most of these accounts want to see the full product range.
Some want to see that plus unique products to them, others a restricted product range.

My question is how i should impliment that.

I began with the first customized account by
Syntax: [ Download ] [ Hide ]

    if($_SESSION['user_account'] == "Vodafone"){
        $this->display_handsets = "";

But as more and more customization took place its getting crowded and messy.

So im here asking for advise on how to manage account customization.

Accounts are pulled from a MySQL DB, so im thinking that i could have it also store an array in a field all the products and categories by default, then build the display based on whats in that field.

But any other thoughts?

PostPosted: Tue Oct 11, 2011 6:13 pm 
Forum Contributor

Joined: Tue Feb 16, 2010 6:39 pm
Posts: 254

PostPosted: Sat Oct 29, 2011 2:40 am 
Forum Newbie

Joined: Fri Oct 28, 2011 11:42 pm
Posts: 22
Location: Pune, India
You can have a user access type, or a role for reseller which you can fetch and according update your display by fetching only that data which is permitted to him, here you also need to define what is accessible and what is not!

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group