We are running oscommerce MS2 and we require a programmer to write a special function to help add 2 product attribute groups quickly using a single "update button" for each group
a) INSURANCE GROUP ATTRIBUTE GROUP: We sell products and offer 3 and 5 years insurance as a product attribute for all the items we sell. This attribute group pricing is dependant on the "Products Price (Gross)". The 3 attributes to add are "No ,thank you", "3 years insurance" and "5 years insurance"; the price of each of these attributes are referenced in an insurance price group table (see attached)
b) BRACELET ADJUSTMENT GROUP: For some products we offer another attribute group that offers a "bracelet adjustment" for a set fee. This is a simplier mod that when selected adds two attributes at a fixed price.
INSURANCE GROUP ATTRIBUTE GROUP DETAIL
So we would need a button in admin/[url removed, login to view] (i.e when adding a new product or editing an existing product price) that when pressed would
a) Clear the insurance attributes "table_product_attributes / options_id_options=7" for that product_id (if no "options_id_options=7" exist then no need to clear)
b) Check the "Products Price (Gross)" and send to the server
c) From the "Products Price (Gross)" -> check the "table_insurance_rates" retrieve the "options_values_id" and "options_values_price" for the 3 years and 5 years insurance
d) Insert three new rows in "TABLE_product_attributes", "options_id=7" for that "product_id"
1) No thank you: option_values_id=1 & options_value_price=0.000 (this option is added as default as most customers do not want extra insurance)
2) 3 years insurance: option_values_id=RETRIVE FROM INSURANCE TABLE & options_value_price=RETRIVE FROM INSURANCE TABLE
3) 5 years insurace: option_values_id=RETRIVE FROM INSURANCE TABLE & options_value_price=RETRIVE FROM INSURANCE TABLE
e) Refresh the screen to indicate attribute added sucessfully
e.g For a item priced GBP 475 (inclusive of 17.5% VAT) this would fall in the table range Group 5-"450.00-549.99" (See attached table)
So need to add "no thank you", " 3 years insurance - £49.99" and "5 years insurance - £79.99"
In the database we would need to add the following attributes (including the product_id)
1) Insert options_id=7 & option_values_id=1 & options_values_price=0.000 & price_prefix="+"
2) Insert options_id=7 & option_values_id=22 & options_values_price=42.5447 & price_prefix="+"
3) Insert options_id=7 & option_values_id=42 & options_values_price=68.0766 & price_prefix="+"
BRACELET ADJUSTMENT GROUP DETAIL
Another button required to add the following attribute for "bracelet adjustment"
a) Not requiried - £0.00
b) Yes Please - £10.00
Again when in admin/[url removed, login to view] (i.e when adding a new product or editing an existing product) a button that when pressed would
a) Check if exists "TABLE_product_attributes / options_id_options=9" for that product_id (if exists then no further action to be taken)
b) Insert options_id=9 & option_values_id=31 & options_values_price=0.000 & price_prefix="+"
c) Insert options_id=9 & option_values_id=32 & options_values_price=8.5100 & price_prefix="+"
* If you want to check our site out to see the attributes in action then PM me
* For Group 1 insurance this is a special case in that there is no "5 year insurance" available
* This operation of this function could be done using AJAX (no refresh) or "update buttons" and refresh depending on your ability.
* We are currently using the AJAX product attribute contribution so this project needs to be compatible with this contribution