Hi,
I am just starting out populating my virtue mart with data.
Right now I have a bunch of products listed in:
jos25_virtuemart_products
jos25_virtuemart_products_en_gb
jos25_virtuemart_product_prices
..and I have pretty much all the categories I need entered into:
jos25_virtuemart_categories
jos25_virtuemart_categories_en_gb
jos25_virtuemart_category_categories
What I'd like to do is make up a list of the products that I want to put into a category and then pop them in there using SQL - so much faster than using the user interface.
Is there some SQL code someone could help me out with where I could say:
Select (field list)
from table left join other_table
...etc...
where Virtuemart_product_id in (1,2,10,12,18,37,38,39,45,46,101)
into destination_table
Suggest you use CSVI rather than develop sql yourself. Makes it much easier for product maintenance in the future. http://www.csvimproved.com/
Hi Kelvyn,
Thanks for the reply.
How can I find out what fields from what product tables need to be used in order to populate the appropriate fields in the product category tables?
Right now it looks like all I need to do is populate
jos25_virtuemart_product_categories.virtuemart_product_id with
jos25_virtuemart_products.virtuemart_product_id
jos25_virtuemart_product_categories.virtuemart_category_id with
jos25_virtuemart_categories.virtuemart_category_id
jos25_virtuemart_product_categories.virtuemart_ordering with 0 (for now anyway)
and what I'll do is
- pick out the 10-15 products I want to work with
- pick out the category i want them in
- find out the product id numbers of those 10-15 products
- find out the category_id number of that category i want them in
- populate a csv with the list of product id numbers of those 10-15
- populate the appropriate other column in the csv with the category_id number of that category i want them in
- save it
- import it
Does that sound right?