WooCommerce, insert multiple products - php

Im using the WooCommerce plugin to WordPress and i have to insert like 1000 products in one category. But all this products have the same name. Do i have Any method to insert multiple products at the same time?

It can have the same name, and be in the same category as well.
The SKU number should just be unique.
Create a page manually.
Use Woocommerce shortcodes : eg:
[products skus="
SKU1000
,SKU1001
,SKU1002
,SKU1003
" orderby="sku" order="asc" ]
This should work, hope it helps.

Related

Make sure a products taxonomy is also duplicated when product is duplicated

I am currently using a custom taxonomy called "occasions" on my products in WooCommerce.
This taxonomy is equivalent to my products except it is "custom".
Therefore the taxonomy is not duplicated when I duplicate a product.
What I want to achieve is, that if my product has two connected categories and one connected occasion - then the duplicated product should have the same.
Can I do this through a custom function - or is there any other functionality, that can handle this problem?

Return custome product list for a category in Woocommerce

I would like to create a product category named "New products" using woocommerce plugin.
But I dont want to change every time product list when I add new products or delete older.
I need a more automatic solution.
Is it possible to return custome product list for a category?
Proces would be:
Take 100 newest products
Return that list if category is named = "New products"
Any advice would be very helpful.

show all products which has discounts (specific price) - Prestashop

I'm looking for a way to display all products that has specific prices to them, and display like any other category page.
I've created the front controller and the class in a module.
I'm not really into sql so I want a query that would fetch all data in one place, like id_image, id_product, etc.
You can find all products with special price at PricesDrop controller. The default URL is
/prices-drop

How to add automatically products (just in the backhand) to orders in woocommerce?

I think is necessary some custom PHP, how can be added automatically to the backhand of the order 3 products (brochure, box and leaflet) for each order?
I do not want this to be visible in the front end like using plugins like chained products but I would like simply that for each order in the backhand automatically would be added 3 specific product to this order.
The three product would be products with their own SKU code and ID of course.
if you have the product id you can use
WC()->cart->add_to_cart($product_id,$quantity);
to set any product you want to customer's cart.

Change number of items bought in Prestashop

I have made a custom shopping cart in prestashop, I now need to increase the number of items bought in my shop manually. I guess this can be done by modifying the database. I tried changing the ps_product_sale table, but to no use. Can anyone suggest as to how to do it.
Thanks.
You can do it by making changes in the ps_order_detail table. In that table, PS stores all information for an ordered product like product id, name, product purchased quantities etc etc.
There is a column named product_quantity, change it and it will change the number of products bought.

Categories