Woocommerce single product - php

I am making an e-commerce website with wordpress and there are a few things that are stressing me. I would like to have a custom single page for each product category. How do I do that?

You can create a new page on Wordpress, and add a shortcode there:
[product_category category="category-slug"] - just replace the "category-slug" with the category slug of yours. You can view the slug at Product > Categories in the admin menu.
This shortcode will display all products in a specified category. You can repeat this and create as many pages for as many categories as you want.

Related

Adding SEO text below product pictures on product category archive pages in Woocommerce

I am using WooCommerce, and I use links to the product category archive pages on my home page to send customers to the product types they are seeking. These product category archive pages play a key role on my website--almost replacing the shop page, so I want Google to recognize the pages on their own merit.
In the product category archive editor, I've entered SEO text for each of my product category archive pages in the text box available. However, this pushes the products down the page so they don't show.
I would like to have the SEO text below the products. I have tried James Hahn's solution suggested here: Adding Additional Text To a Product Category Page in Woocommerce However, my whole website breaks when I do this. Obviously, I'm missing something.
I would have tried LoicTheAztec's answer, but I'm not clear on how to add the hooked function and where.
Sorry, I'm pretty new to PHP.

Displaying Dynamic Shortcodes for Building an e-Commerce Store with WooCommerce?

I have a WooCommerce store with Elementor.
I'm using an Elementor category product page template to generate the product page for each set of products.
I want to use this plug-in to create a table instead of a product grid: https://barn2.co.uk/wordpress-plugins/woocommerce-product-table/
To display the table, the creator of the plug-in provides the following shortcode: [Product Table]. I know you can modify the table to display a specific sub-category, but is it possible to automatically pull the subcategory for each page from a single shortcode? If not, I would need to create a new template for each shortcode...
For example: If I fill in the product id of e.g. category 2 in the shortcode, the Elementor product page template will display the table for this category on every page.
Question
Can I make the subcategory aspect of a shortcode dynamic? Preferably, the X is set automatically to the product's category of which page is being visited.
There is a question very similar to this, but I am a beginner and the .php code they provided was a little hard to understand...
Here's a link to the original question: Insert WooCommerce product id dynamically in shortcode
Any help would be greatly appreciated! Thanks guys.
It looks like this page in the plugin documentation answers your question.

Woocommerce Wordpress Create category for "Out of Stock" items

Is there a way to create a category for items that have their quantity/inventory set to '0'? So that all these items can appear on their own page?
I need to display all "Sold" products, and I don't think it makes sense to create a "Sold" category to add them to, as this starts to get funky with how to items are categorized within other product categories.
Thanks in advance.
I found a plugin that works, for anyone else who may need it:
WooCommerce Sold Out Products enhances the built-in WooCommerce functionality by adding a Widget and Shortcode for displaying sold out products.

wordpress woocommerce, showing a single specific product and its options on homepage

For a reference of the website i am developing you can view it here: http://prettyloxx.netii.net/
I am creating a ecommerce website using wordpress and woocommerce together in a theme
that i added the woocommerce support to. it would's great but however i am a little stuck.
What i would like to do is to place a single specific product on the bottom of the homepage with its options.
So ideally, i would for example like to add a single product such as http://prettyloxx.netii.net/?product=wefts on the homepage after the homepage content, howevere without the product's description. So on the hompage the user would see the attributes and options as well as the product image at the bottom of the page, select them and then click on the checkout button directly from the homepage.
Thank you in advance,
You can add [product id="99"] or [product sku="FOO"] Shortcode for specific product to add your homepage. Or if you want feature products then woocommerce gives the shortcode [featured_products per_page="12" columns="4"] for that. Hope those will help you.
Here we can use Id of single woocoomerce product ,
[product id="42632 "]
and for sku
[product sku="examplesku"]
and we can show products of a specific category
[products columns="3" category="solar-lantern"]
In above shortcode just pass the slug of the category and products are shown of this specific category

WP E-commerce: show all products in category

How can I show category page that contains all products in this category? I have a menu with categories in the header. Those links are linked to the categories. I need customize the WP E-Commerce category template. Could you help?
Have you tried the "wpsc-products_page.php" template? If your theme doesn't have the file already, you can generate it via the WPEC settings page.

Categories