Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Set an attribute to every item in my store?


fut

Recommended Posts

I have a sneaker store up in the works and just installed a size attribute. I have hundreds of items and do not want to go back to every item to turn on the attribute. Perhaps this is a newbie question, but is there anyway for me to turn on the attribute for every item in my store easily?

Link to comment
Share on other sites

I have a sneaker store up in the works and just installed a size attribute.  I have hundreds of items and do not want to go back to every item to turn on the attribute.  Perhaps this is a newbie question, but is there anyway for me to turn on the attribute for every item in my store  easily?

 

there is a contribution for an attribute copyer.

 

You could also check in phpmyadmin in which tables the info was added in which way, and then repeat the same via sql for all products in one simple insert statement.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

there is a contribution for an attribute copyer.

 

You could also check in phpmyadmin in which tables the info was added in which way, and then repeat the same via sql for all products in one simple insert statement.

 

 

write a small piece of php to do it.

 

get the table name and column name and the value you want it set to

 

<?php

require('includes/application_top'); //as this file contains the database connectivity

$UpdateQuery = "update table_name set column_name = 'the_value'";

tep_db_query($UpdateQuery);

?>

 

save this to a file in your catalog root folder.

 

Go to your browser and navigate to this file, that should run the query. This will update every record, if you only want to update certain records you will need to include a where clause in the query.

 

If the value is numeric do not enclose it in single quotes (')

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...