| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Bulk Add Featured Products | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Bulk Add Featured Products
For those of us who need many featured products or to edit featured products list frequently, the interface to add featured products one by one is not sufficient. I spent the last few hours trying to figure out how to bulk add/delete featured products, this is the fruits of my labor:
The best way to add featured products seems to be directly through the database. The database table is called: xcart_featured_products The fields that it has are: productid: Product ID (I'm pretty sure this is the primary key) categoryid: ID of the category that you want the featured item to be in. If you want it to be featured at root level, then the value should be "0" product_order: The standard seems to be doing this by 10's, so the first one should be 10, the second 20 and so on. I think you can leave this blank or make them all the same number if you want them to appear in as they are in the database though. avail: Availability "Y" if the product is available "N" if it is not. Originally I tried to add all of these in a .CSV file through the SQL program that my hosting supplied. I had trouble with this, so instead I used Microsoft Excel to create a long statement that added them all individually and this worked fine. This is the syntax for the statement: INSERT INTO xcart_featured_products VALUES ('productid','categoryid','product_order','avail') ; This is a sample of what my statement looked like. I found that I had to have a new "INSERT INTO" statement for each line that I wanted to add: INSERT INTO xcart_featured_products VALUES ('101','0','10','Y'); INSERT INTO xcart_featured_products VALUES ('102','0','20','Y'); INSERT INTO xcart_featured_products VALUES ('103','0','20','Y'); You can use the Excel function "CONCATENATE" to pull all the strings together into a statement. KeyWords/Phrases Bulk Add Featured Products Add Multiple Featured Products Add Featured Products in Bulk Edit Featured Products Featured Product List |
|||||||
#2
|
|||||||
|
|||||||
Moving to Custom Mods
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
Re: Bulk Add Featured Products
This looks like a good workaround and I'd like to try it. Not sure how to understand the Excel strings and statements though. Would be great if this could be explained in terms of cells, etc. - maybe if a sample csv file could be posted here?
thanks.
__________________
Gold 4.0.19 |
|||||||
|
|||
X-Cart forums © 2001-2020
|