zen cart attribute for each product:
Attribute Product Codes V1.0 for zen cart
Written by mrphpguru with a large chunk of help from Richard Lindsey (aka Velveeta),Fred Doherty (aka Rochdalemark)
This is the instruction file for Attribute Product Codes. v1.0
This contribution will allow you to add codes to each product attribute based on a per item only basis. This is so that if you have 2 suppliers having different codes for say a colour red attribute you can have a different code for each.
The attribute product code will be used as a suffix to the base product code.
i.e
Say you sold Apples.
The code for your standard Apple is AP1
But you had a choice of colours and sizes for those apples, you can now have the following codes generated for each.
Green Apple: AP1/G
or
Red Apple: AP1/R
or
Apple Large: AP1/L
or
Apple Large Red: AP1/L-R
As you can see the base product code stayes the same but with the seperate atribute code added as a suffix to the end.
This each attribute product code can be given a sort value, so that your code is in the right order.
For example
Your code for a Large Red Apple: AP1/L-R could mean a completely different product if it was the other way round like AP1/R-L. This way there is no mistakes in the way the codes are generated when multiple attributes are selected.
zen cart attribute for each product:
SQL
ALTER TABLE `products_attributes` ADD `code_suffix` varchar(11) NOT NULL default ” AFTER `options_values_id`;
ALTER TABLE `orders_products_attributes` ADD `code_suffix` varchar(11) NOT NULL default ” AFTER `products_options_values`;
ALTER TABLE `orders_products` ADD `products_code` varchar(20) NOT NULL default ” AFTER `products_model`;
ALTER TABLE `products_attributes` ADD `suffix_sort_order` int(11) NOT NULL default ’0′ AFTER `code_suffix`;
ALTER TABLE `zenoffthewallproducts_options_values` ADD `code_suffix` TEXT NOT NULL AFTER `products_options_values_sort_order` ,
ADD `suffix_sort_order` INT NOT NULL AFTER `code_suffix` ;
Files:
1) admin/options_values_manager.php
2) admin/order.php
3) admin/packingslip.php
4) admin/includes/functions/general.php
5) catalog/includes/templates/template_default/templates/tpl_account_history_info_default.php
6) catalog/includes/templates/template_default/templates/tpl_shopping_cart_default.php
7) catalog/includes/modules/pages/shopping_cart/header_php.php
To implement properly please contact me
mrranjeetmca@gmail.com
mrphpguru@gmail.com
you can also post this project in scriptlance.com and getafreelance.com and invite me with the programmer name “mrphpguru”
i charge $25 only...
You can see the review of scriptlance review






