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

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?

Related

Combine same attributes with different slug - Woocommerce

I have multiple product attributes with the same name and same terms but different slugs. That's a result of a migration from Shopify to Woocommerce. For example, attribute 'Μέγεθος'('Size' in Greek) entered 2000 times for each product. Now i don't know how to combine those to one attribute with all terms like S,M,L,XL,44,45,56 etc.
Unless i edit product attributes one by one, is there a most sufficient option? Any suggestion?
Screenshot

How do I create a custom product types in woocommerce with over 400 child products pulled from categories selected in the data panel?

How do I create a custom product type in Woocommerce with over 400 child products pulled from categories selected in the data panel ?
I have over 400 products to group, how can I programmatically pull 400 products from certain categories to be grouped, without having to enter each child product manually in the back-end.
I imagine my best bet would be to make a custom product type, but how do I make a custom product type that inherits child products from a certain category.

Condition function for a category of product

None of snippets are working for categoreis based query:
for specific product categories in woocommerce
Unset product tabs for specific product categories in woocommerce
or changing tab text for a particular category which is displayed as special product on display page or single product page.
Codes by LoicTheAztec are perfect as always but i dont know where i am going wrong.

Magento: How to filter current category by another category - layered navigation

I have a Magento (1.7.0.2) installation with some products inside.
I have two sibling categories (Brand and Clothes).
Brand contains all the brands of the clothes, and clothes have multiple subcategories (shoes, pants, etc.)
I am using layered navigation. When opening a category (lets say "shoes"), I display a list of the brands in the layered navigatin (I wrote some custom code for this).
Here is the problem:
When I click on a brand, I want magento to filter the products by both categories and display matching results.
Since Magento's default functionality is to just display items from the last category clicked, I need to change this.
Does anyone have any ideas how ?
You need to define attributes for that and you don't need to write custom code for that at all. So it would work for you like double structure there where you add a actual matching attribute and a shadow category for that matching attribute.

WooCommerce, insert multiple products

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.

Categories