I'm new to Woocommerce. I want to change the structure of the checkout page. Now I looked into the file "form-checkout". This is the right file?
In this file there is not much of the structure. I find many php actions. For example:
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
Where can I see the content of this action? So I can go in that file and change the structure?
P.S. Does anyone want to share more knowledge about Woocommerce with me?
There are several php files that make up the checkout page.
wp-content/plugins/woocommerce/templates/checkout/
cart-errors.php
form-billing.php
form-checkout.php
form-coupon.php
form-login.php
form-pay.php
form-shipping.php
review-order.php
thankyou.php
wp-content/plugins/woocommerce/templates/checkout/form-checkout.php is the main file.
It's recommended that you copy the template folder from the woocommerce plugin directory, put it at the root of your theme and rename it to woocommerce (leaving the template folder intact in the plugin directory to allow for upgrading).
Related
I am creating a Wordpress custom theme, and I've been having issues with my woocommerce template rendering. Firstly, not all of the pages are showing up (some of them are reverting to the index.php and page.php files). Secondly, for the pages that are showing up (the single product page, the archive products page), the css is not being applied. I have tried everything suggested on the docs (hooks), but I have failed. Here is a link to my github for you to see the file structure.
https://github.com/naderae/elbe-collections
possible issues wuth my code:
my code is not written in the standard wordpress way. I only have three pages so far, index.php, page-about.php, and page-team.php, which work fine. page.php and single.php are empty. thus, my site consists of 2 pages, and index.php.
I've been struggling with this for 2 days, and would really appreciate some guidance of hoe to get me back on track. Cheers
Below is a list of some basic theme templates must preset in theme, more about this in details click here.
index.php
style.css
header.php
single.php
page.php
category.php
archive.php
404.php
I would recommend you to start with some default WordPress theme like twentyseventeen theme or other. These themes will have all basic functionality of WordPress. Check functions.php in the theme folder to customize/add functionality.
for more details about Template Hierarchy click here
Customize WooCommerce
Template structure & Overriding templates via a theme - link
Customizing WooCommerce - link
To overwrite woocommerce css you need to add a woocommerce folder to your theme. And go from there.
Woocommerce will also always use their own templates so the easiest way to change the layout is to use a child-plugin from woocommerce.
I am using WooCommerce on a wordpress installation. I have also purchased the plugin woocommerce-checkout-field-editor-pro to create custom fields on the checkout form.
My problem is, while the WooCommerce Checkout Field Editor Pro plugin is great, it does not allow me to just add a text link. It allows a label, but no way of making that label a link.
If I can just figure out where the custom label field gets stored when its created I am thinking I can just wrap it in an <a href > tag to turn it into a hyper link. But I can't figure out where the field is stored. Any help would be greatly appreciated.
Thanks!
A few template files make up the checkout page and can be found in:
wp-content/plugins/woocommerce/templates/checkout
The files which may be of most interest to you could be either form-checkout.php or review order.php.
Inside your own theme folder, create a folder called woocommerce and copy across any files you want to edit, making sure to place them inside the exact folder structure they are kept within Woocommerce. So in this case, copy the files to your_theme/woocommerce/templates/checkout/. Any changes made to these files will override the original template.
You can edit the templates and add, or remove, any code as you need to.
Hi i'm creating a webshop with WooCommerce but with a self made theme, now showing the content-single-template works fine, however the cart/checkout page is not working. This is what i've done so far:
• Add woocommerce.php in the root of my theme with woocommerce_content() inside.
• Created "woocommerce" directory in the root of my theme inside this directory another one "checkout" and inside there my custom form-checkout.php
• Shortcodes on every page are included
• Clean install WooCommerce
• Flushed permalinks
I've read trough this article from WooCommerce on how to integrate it and followed every step precisely.
When i switch to a differend theme it does show the cart/checkout page so wondering what i'm overseeing here.
Thanks
EDIT:
Contents: woocommerce.php
<?php
get_header();
woocommerce_content();
get_footer();
Got it fixed, because i basically created my own theme i started switching theme's and see the difference between mine and the working theme.
What fixed it for me was in content.php placing this:
<?php the_content(); ?>
The Proper way to work with WooCommerce Templates is, Copy the templates folder from your /wp-content/plugins/woocommerce/templates/ and paste it in your theme like /wp-content/themes/your-theme/ and rename it to /woocommerce/ So It would be like this
/wp-content/themes/your-theme/woocommerce/ and then you can edit the templates and change the UI.
I'm attempting to rearrange the layout for my WooCommerce pages, specifically the individual product page but I can't find where the HTML code is. I'm looking for:
<div class="woocommerce-tabs wc-tabs-wrapper">
I've had a search using my text editor across all available files and it cannot be found but it's very clear that it is in the inspected elements. Is there somewhere I can find it or do I just have to override the whole thing? If so, how?
If you want to design the pages of WooCommerce copy the folder plugins/woocommerce/templates/ to your theme folder and rename it 'WooCommerce' would be: themes/mytheme/woocommerce. That way you can modify the templates and update the plugin changes are not erased.
For more information read here
I just setup WooCommerce on my wordpress site:
http://artendijen.com/product/test-product/
I am not a fan of the template where it has the description and additional information below and in tabs, I would like the have the description and additional information to the right of the product image. Is there a setting I missed or will I have to edit it via CSS myself?
There is no setting for layout in WooCommerce. If you can do what you need to do with CSS then thats great. Otherwise, you will need to use hooks and actions in your functions.php to move things around. You can also overwrite woocommerce template files by copying them to your template with the same structure and file names you find in the WooCommerce plugin.
http://docs.woothemes.com/document/introduction-to-hooks-actions-and-filters/