Advice please on handling customization
Posted: Thu Oct 06, 2011 4:05 pm
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.
ie:
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
eg:
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?
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.
ie:
Code: Select all
$this->items['pcvs300'] = new ItemClass("pcvs300","Polycom Voice Station 300","2200-17900-013");
$this->items['pcvs300']->set_display();
$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)
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
eg:
Code: Select all
if($_SESSION['user_account'] == "Vodafone"){
$this->display_handsets = "";
}
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?