Contributions
Attributes Copier
Copy a products attributes when copying an existing product to a duplicate product. Just edit the name, module, price, text, etc. as needed.
Expand All / Collapse All
If you have many options installed probably for you is difficult to find quick this one which you need.
Attributes Copier create new table for every new option and later you have a lot of tables.
Here is a nice modification I did and it works fine for my shop. Installation time is more or less 10 seconds, 2 images to upload and 1 file to edit.
It uses javascript which mean you need to enable javascript in the browser you are using.
Screenshot is included in the zip file.
NOT FULL PACKAGE!
Trying to use this contrib I found a bug, perhaps it comes from an older version.
I am using 2.2 RC2a + Attributes Sort & Copier (Very Efficient) and this contrib to make the attributes to show on STS the way you set it up in admin.
download the attached fine and follow instructions.
Cheers
Instructions for getting this module to work with STS. Not complete package -- just text instructions.
Only a Portugues Translation / Tradução em Português somente
Added The fixes in to the hole Zip.
Spanish translation / Traducción al español
Only a Swedish translation
There's a small typo in admin/product_attributes.php.
A space is missing and results in you not being able to delete product options.
Typically it gets you the following error message:
1146 - Table 'XYZXYZ.products_options_values_to_products_optionspovt' doesn't exist
Well, with that small fix no more error message and you can now delete your product options!
in catalog/admin/categories.php find this
// WebMakers.com Added: Attributes Copy
$contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
// only ask about attributes if they exist
if (tep_has_product_attributes($pInfo->products_id)) {
$contents[] = array('text' => '<br>' . TEXT_COPY_ATTRIBUTES_ONLY );
$contents[] = array('text' => '<br>' . TEXT_COPY_ATTRIBUTES . '<br>' . tep_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br>' . tep_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO);
$contents[] = array('align' => 'center', 'text' => '<br>' . ATTRIBUTES_NAMES_HELPER . '<br>' . tep_draw_separator('pixel_trans.gif', '1', '10'));
$contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
}
// WebMakers.com Added: Attributes Copy
and replace with this:
$contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
$contents[] = array('text' => '<br>' . TEXT_COPY_ATTRIBUTES_ONLY);
$contents[] = array('text' => '<br>' . TEXT_COPY_ATTRIBUTES . '<br>' . tep_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br>' . tep_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO);
$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
$contents[] = array('align' => 'center', 'text' => '<br>' . ATTRIBUTES_NAMES_HELPER . '<br>' . tep_draw_separator('pixel_trans.gif', '1', '10'));
And that it's. No files upload only this instruction.txt
Changes from Version 5.1b:
-Same as 5.1b, but added full multilanguage support and small corrections in a few databases queries and constants for multilanguage support. Included the Chad's fix in admin/product_attributes.php
Best regards
Though Chad pointed out a valid error, the file he submitted still has an error in it (probably grabbed the wrong file). Until I have time to submit an update to the whole contribution (including a few more changes I've been working on), I couldn't just leave a broken contribution.
Thus, I suggest you use v5.1b, with the following change:
in /admin/product_attributes.php (line 227):
pov_products_options_values_id
change to:
pov.products_options_values_id
I am required to have a file attached to this post, so I am attaching product_attributes.php with the above fix. But I would suggest you just make the change to your file directly (so as to disturb the least amount of existing code).
I installed this package and everything worked flawlessly until you try to delete a main option from the attribute page, the SQL was a little malformed. I believe I found the cause of the problem. It was inside product_attributes.php
I've reincluded the entire archive here, the instructions don't change.
After working on forward fitting this contribution to the osCommerce2.2MS2 fileset, I decided to add on a few features, and clean up a few things that I didn't like. (since I was removing features, I created the v5.1a package in case anyone still wants those features).
Changes in this package include:
- Updated and Improved Installation instructions.
- -Same as 5.1a, but removed all the Coming Soon code including:
- Product Attributes: One Time Charge, Attribute Weight, Weight Prefix, Units, Unit Price
- Added a sort order to the Option Values table.
- This means that you only have to specify the sort order once for each Option Value possibility.
- When you add a new "Option Value" to the Product Attributes table, the Sort order defined will be copied
- This means that you will have (after initial setup) a common sort order for your products as you add them, but you can tweak individual products if you need to change their sort order (to set the default selected attribute values for example).
All this work should (hopefully) allow this module to be directly applied to a fresh installation of osC without much (if any) hassle.
Note, this is a full repackage of the contribution, not a patch.
I welcome feedback in the thread http://forums.oscommerce.com/index.php?showtopic=131802
This is the full Attributes Sorter and Copier Contribution, with a few changes:
mainly: - Updated the directory structure/files to be exactly what an out-of-box 2.2MS2 has. Including forward fitting the changes to the version of files supplied with the osC2.2MS2 release.
- Removed sort-order from Product Option since it is now sorted by product_option name in the official version.
- DISCLAIMER: I don't claim that the "COMING SOON" (like "one time charge') code works as well as before, I tried to keep the functionality that was there in the patch, but since this functionality was incomplete, I didn't work too hard on that.
- Added a change.sql file that has all the sql commands, removed them from this README
- removed the sql commands that added the products_options_sort_order
I would like to thank the authors of this Contribution for their continued hard work. This module is very useful, and I hope that this update will help keep it useful.
(note, this is based on the 13 Jul 2003 patch codebase)
This little modification adds source product search capabilities do the attributes copier module.
I don't have much time to spend on it, so be carefull and use at your own risk.
To use, just overwrite the file products_attributes_copier.php or copy and paste the new code found inside this file
Just made a quick fix so you can now just copy the files to the directories, all credit still given to those who deserve it! Thank you guys for supporting open source!
Copy attributes to duplicate product.
Copy attributes from existing product to another existing product.
Copy attributes from existing product to all products in a category containing products.
Product Options Sort Order
Individual Attributes Sort Order per Product
Can now change Product display order from products_name to products_model
Edit/Update attributes on Products page
Thanks to David Garcia Watkins and Matthijs vd Vegte for peices and parts that made this contribution possible.
Copy a product's attributes when copying an existing product to a duplicate product. Just edit the name, module, price, text, etc. as needed.
Allows for a hidden category for testing that is masked from the Catalog but you can still reach if you know it's categories_id
Also includes an Attributes Sort feature via the products_attributes.php
NOTE: This is an alpha version of this add-on. Sparse instructions just enough to get you started.
BE SAFE AND BACKUP!
Note: Contributions are used at own risk.