osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Product Attributes Clone tool

This is a discussion on Product Attributes Clone tool within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; I was frustrated that it seems no tool existed to clone all attributes from one product to multiple others, so ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Welcome to osCMax Join osCMax Now! Download osCMax Here
Reply

 

LinkBack Thread Tools
  #1  
Old 09-10-2008, 08:50 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,466
Thanks: 83
Thanked 356 Times in 334 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Product Attributes Clone tool

I was frustrated that it seems no tool existed to clone all attributes from one product to multiple others, so I came up with the attached solution

FIND at line 27:
************
case 'clone_attributes':
$clone_product_id_from = $HTTP_POST_VARS['clone_products_id_from'];
$clone_product_id_to = $HTTP_POST_VARS['clone_products_id_to'];
tep_db_query("delete from ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id='".$clone_product_id_to."'");
$attributes = tep_db_query("select products_id, options_id, options_values_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES ." where products_id='".$clone_product_id_from."'");

while($attributes_values = tep_db_fetch_array($attributes)) {

tep_db_query("INSERT INTO " . TABLE_PRODUCTS_ATTRIBUTES . " ( products_id, options_id, options_values_id, options_values_price, price_prefix ) VALUES (".$clone_product_id_to.", ".$attributes_values['options_id'].", ".$attributes_values['options_values_id'].", ".$attributes_values['options_values_price'].", '".$attributes_values['price_prefix']."')");

}
break;
************


REPLACE WITH:
************
// BOF Multiple Product Attributes Clone
case 'clone_attributes':
$multi_clone_products_id_to=$HTTP_POST_VARS['clone_products_id_to'];
for ($i=0;$i
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Product Attributes Clone tool michael_s New osCommerce Contributions 0 03-29-2008 05:12 AM
Product Attributes Clone tool michael_s New osCommerce Contributions 0 03-17-2008 06:12 AM
Product Attributes Clone tool michael_s New osCommerce Contributions 2 12-11-2007 10:14 PM
how to clone the zones shipment mod? xzyyy osCMax v2 Features Discussion 3 12-26-2006 02:50 AM
Specific Product Image based on chosen product attributes? chrisrex osCMax v2 Customization/Mods 0 11-22-2005 09:41 AM


All times are GMT -8. The time now is 01:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax