Default whole woocommerce category content and replace it with custom value or replace woocoomerce category page with another just by calling in plugin.
based on this link it seems there is no action for whole shop category page content.
its important to doing this with custom plugin and not any changes on template.
i found a simple answer.
use JS to hide shop loop divs and add my plugin resluts to woocommerce_before_shop_loop.
Attention: this is not a really good solution.
Related
i want to use a different navigation and some other individual codes for all WooCommerce pages.
For archive-product.php or content-single-product.php this is no problem. I used them in my themechild (theme-chiild/woocommerce). But for pages like cart or checkout its not working.
Is it possible to use a different page.php for all WooCommerce pages?
Cart and Checkout by default use your default page.php and just use a shortcode to generate the page content.
So you have a few options.
Modify page.php to check if it is cart/checkout
Create a custom page template for both that modifies what you need
Create a custom page template for each if you need different options on each
In Woocommerce > templates you do have cart/checkout templates as well
Depending on the level of customization. You may need to hook into those pages to add/remove what you need. https://docs.woocommerce.com/wc-apidocs/hook-docs.html
Im using the divi theme with Woocommerce. I need to know how to add more than one product from my home page, avoiding going to the product page. Just using add to the cart function or similar.
Regards
For example:
Add to cart
I have a website that is using WooCommerce to sell items. Here is my demo site:
http://demo.bergdahl.com/
You can see the ecommerce pages and their layouts here:
Layout 1 (left and right sidebars):
Products list: http://demo.bergdahl.com/shop/
Category page: http://demo.bergdahl.com/product-category/catridges/
Layout 2 (right sidebar only):
Single product page: http://demo.bergdahl.com/product/6-oz-catridge/
I have gotten it so that most of the WooCommerce pages use have layout 1 except the single product page that has layout 2. Layout 2 is set to be the default layout in the theme and applies to the other 170 pages of the site. I don't want to change the default layout, I just want to find out what page I can use to set the layout for the single product page.
Basically, I would like to have all WC pages use layout 1.
My question is, how does WooCommerce chose which layout is assigned to which type of page?
It seems like the Product list and the Category pages are pulled in from the blog page layout. The Cart, Checkout, and My Account pull from their actual pages. I am not sure how to set the layout in the single product page.
P.S. - This site uses an older theme with no WC support. I don't know if this may be the problem but I could only adapt the theme by using the woocommerce_content() method listed here: https://docs.woocommerce.com/document/third-party-custom-theme-compatibility/?utm_source=notice&utm_medium=product&utm_content=themecompatibility&utm_campaign=woocommerceplugin
You can override the singe product template.
To override the single product template, copy:
wp-content/plugins/woocommerce/templates/single-product to
wp-content/themes/Builder/woocommerce/single-product
There is an official documentation for WooCommerce theme override at Template Structure + overriding templates via a theme.
Thanks to Lax, I found a way around it. I actually used the woocommerce.php that I created out of my theme's page.php. This got it out of the same container that the product was in.
I then used the dynamic_sidebar('sidebar_name_here') to display the sidebar on that page . The full code I used was:
<?php if(is_product()){?>
<div class="store-sidebar-left">
<?php dynamic_sidebar('store-sidebar-left');?>
</div>
<?php } ?>
This allows it to only show on the single product page.
I had one small problem where I couldn't find the name of the sidebar in my theme or my database so I just created a new on in my functions.php file and used that one.
I created a Wordpress page that must display the products that I've created using Woocommerce Plugin. It seems like it has it's own Shop Page so I tried to customize it (it has different template) but failed since I am just a beginner in Wordpress. So I tried making my own Wordpress page (just like what I said at the first line) having the same template with other menu options. So it's good. The problem is I cannot make the products show. So I searched and installed a Display Product for Woocommerce Plugin so that I can call the products, on the webpage that I created, using shortcodes. Unfortunately, there is no single products that shows in my page. Any suggestions with this?
Try using this Shortcode [products] on a new page. It showed me all the products i had in my woocommerce store.
Let me know if that fulfills your needs.
I want to change the way grouped products are shown by two different versions of wordpress.
case 1: Wordpress 4.1.5 running WooCommerce 2.3.11 with custom theme.
case 2: Wordpress 4.2.2 running WooCommerce 2.3.11 with default theme.
I need to display grouped products (child products) in a tabular form with quantity box before it just like image2. Where do i need to make a change so i could achieve same in case 1? Why it is showing View all Products button instead of listing the products itself?
any help will be appreciated.
You can read about WooCommerce's template overrides. If you aren't seeing the default with your theme that means that your theme is overriding it.
I can't be sure, but probably you need to go into your theme's woocommerce folder.... and find the grouped.php template in:
yourtheme/woocommerce/single-product/add-to-cart/grouped.php
and rename it to anything else grouped-backup.php so that WooCommerce will stop using it.
If that doesn't work, then it is perhaps being hidden by CSS or by Javascript. I don't have enoug information to know and you should contact your theme's author.