Community Forums › Forums › Archived Forums › General Discussion › Customize WooCommerce pages in Genesis Child Themes (Digital Pro)
Tagged: WooCommerce
- This topic has 2 replies, 3 voices, and was last updated 7 years, 8 months ago by Victor Font.
-
AuthorPosts
-
July 31, 2016 at 7:33 am #190523ToranaxMember
Dear reader,
I'm new to coding but so far learned myself a lot of things, very happy with how it's going and I enjoy it too.
I have one quick question.I want to customize my WooCommerce pages like the checkout/cart pages via mostly .php, and maybe a bit css. It's highly recommended to use a Child theme for customizing because otherwise you lose your customization at every WordPress update.
However, should I make a secondary 'WooCommerce' functions.php file in my Child theme(Digital Pro), or just put code in my regular functions.php file?
I think I can find out how to copy the WooCommerce code and start a new 'WooCommerce' functions.php, but I'm not sure if it's neccesary, I hope someone can help me out.
Cheers!
July 31, 2016 at 9:27 am #190529Brad DaltonParticipantThe WooCommerce Genesis Connect plugin includes a template folder with 3 templates you can use in your child theme.
Makes no difference whether you add another file for woocommerce custom functions or use your child themes functions file
August 1, 2016 at 6:07 am #190569Victor FontModeratorI create a lot of highly customized Genesis/WooCommerce. This is an example, http://dev1.houseplanworks.com. It is still a work in progress, so not all of the functionality is working yet with the custom search. But if you click the Buy Plans page and then click on any of the plan images from the catalog, you'll see how custom you can make the page. If you click on a slider image, you'll see an individual product page.
I generally keep my WooCommerce functions, CSS, and jQuery in separate files to make it easier to transport customizations to different themes. I don't think I changed anything within the Genesis Connect templates. All they do is add Genesis related features and call the standard WooCommerce content templates. The only exception to this is Ajax functions. All of the Ajax calls related to building and executing the custom search needed to be placed in the theme's functions.php. The radio buttons and sliders are built dynamically and will change as database content changes. I also build a custom SQL statement on the fly depending on what options are selected on the search screen. WP_Query was executing too slowly for this particular purpose. I don't know why, and didn't have the time to invest in finding out why, but when I had the Ajax stuff in a separate file, it wouldn't execute. Leaving it in functions.php allowed it to work fine.
Each of the products on the buy page uses a custom Ajax-ified single product button to add to cart. I'm working on an article to explain how that can be done.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.