Thank you for contacting me. Please note that I live in the GMT+3 time zone - responses might be delayed by this.
Tagged: categories, woocomerce
This topic has 7 replies, 2 voices, and was last updated 1 year, 9 months ago by Szabi – CodeRevolution.
-
AuthorPosts
-
-
March 18, 2023 at 7:11 pm #7078
Hi, I wanted to ask 2 questions about the plugin:
1) I want scrape and save products in a specific category of woocommerce, when I want to do it with 3rd categories (category with 2 parents), they do not appear in the “Additional post category” box, I try to put the id in the box below “Autocreated categories parent category id” but it doesn’t create it either. Is there a way to import them?
2) is it possible for the scrape to take the “title” information that is inside an “a” tag?
I attach images.
Thankyou!
Attachments:
You must be logged in to view attached files. -
March 18, 2023 at 7:56 pm #7082
Hello,
First of all, thank you for your purchase.
1. WooCommerce product categories are not regular categories, but they are custom taxonomies. So, they need to be added using the ‘Post Custom Taxonomies’ settings field. The categories have the following custom taxonomy ID: product_cat
So, to add categories, you can do as follows:
Post Custom Taxonomies
product_cat => YOUR_CATEGORY2. Yes, this should be possible using Regex. You can try to write a Regex expression which matches this tag. You can test your Regex here: https://regexr.com/
Let me know if this helped.
Regards, Szabi – CodeRevolution.
-
March 20, 2023 at 1:28 pm #7105
<div>
- Hi, the custom taxonomy work good, but when i have 2 categories with the same name, the plugin takes the first categorie with this name. Have i any way to use a “CATEGORY ID” instead of “CATEGOY NAME”?
</div>
<div></div>
<div>- I am trying to get the value with this regular expression: (?<=<a\s.*?\title=”).+?(?=“), but nothing happens, I do a test trying to put this information in the body content, but I really need to use this information to create a Woocmerce custom attribute “Brand”. Do you think this is possible?
</div>
-
March 20, 2023 at 3:22 pm #7113
Hello,
1. Yes, this is possible, you can also use the numeric taxonomy value IDs to which you wish to assign custom categories.
2. Please send me the URL of the site from which you want to extract the above Regex and I check on it.
Regards.
-
March 20, 2023 at 3:41 pm #7115
https://blsfashion.com/en/product/banador-blanco-alexander-mcqueen-calaveras-negras/
I just need the value of title to make an atribute “brand” with this name.
Attach a picture
Thanks
Attachments:
You must be logged in to view attached files. -
March 20, 2023 at 4:34 pm #7117
You can try Regex:
#<meta property=”product:brand” content=”([^”]*?)”\s?\/>#i
-
March 20, 2023 at 4:49 pm #7118
sorry but i dont understand where do i put this code
-
March 20, 2023 at 6:47 pm #7121
Please use as below:
Custom Shortcode Creator
brand => regex @@ #<meta property=”product:brand” content=”([^”]*?)”\s?\/>#i
Post Custom Taxonomies:
pa_brand => %%brand%%Please note that you need to create a custom product attribute called Brand.
Regards.
-
-
AuthorPosts
The topic ‘woocomerce categories, title information inside a tag’ is closed to new replies.