I have been working with the Woo Commerce plug-in which allows to override its templates by placing a new version of them in a /woocommerce folder at the directory of a theme.
However, I can't seem to do the same when I need to override markup for th particular Woo Commerce Gateway Paypal Express Checkout plug-in. Am I missing something? I noticed that markup is directly built in classes which is slightly different to how Woo Commerce arranges it with templates.
The markup I want to override allows for the order confirmation and payment confirmation pages to be customized. These seem to render with page.php. But the markup is present across various files in the plug-in.
I am considering creating a copy of the plug-in and add my own overrides but as I understand this comes at a cost of future updates.
For context no layout plugins like Div or Elementor are being used, this is a theme written from scratch that makes use of .twig templates.
Any thoughts or information on how to go about this would be deeply appreciated.
Related
The situation is, I'm currently creating a website from scratch for a client, one requirement is Wordpress, and the layout is a "One Page Layout". Since it's my first project developing a scratch theme for wordpress, I have question concerning the method used by experienced users here to achieve the One Page functionality.
So, I achieved this functionality by:
1 - Creating Child pages of Home, and assigning a page template that matches a section (team, hero, about, contact ...). The cons in my opinion is the custom labels for each diff section, hard for client to manage, the wordpress "page editor" lacks functionality.
2 - (method used) created a "one page template", and implemented a widget area (sidebar) for the sections, and created a custom plugin for the team that adds widgets to the wordpress dashboard, then the user can add them in "Widgets > One Page Area", and edit the contents of each sections. Pros, it's easier for the client to manage the widgets and order the sections in homepage. Cons, I think that it's not a "good" way of achieving one page functionality with widgets.
So, I would like to know in what kind of way you implement a onepage functionality in wordpress theme developing.
PS: I don't want to use a plugin already created since it's also for University and they don't want me to use other developers plugins.
The WordPress plugin WooCommerce allows me to overwrite any of its files by making a copy of that file and placing it in my child theme directory. This does not work for other plugins.
How does this functionality work for WooCommerce?
Why doesn't it work for other plugins?
How can I make it work for other plugins?
Not all plugins need this functionality so it is not standard, it's just something you can allow your plugins users to do if it is relevant to its functionality / theming.
There is a great article here on how to achieve it for your own plugins, however you cannot apply this to existing plugins unless you want your copy of an existing authors work to fall out of date.
http://jeroensormani.com/how-to-add-template-files-in-your-plugin/
How does this functionality work for WooCommerce?
The magic is in the coding of Woocommerce. They have added functionalities in to cater for this because of the technicality of their system and the demand for customization.
Why doesn't it work for other plugins?
Woocommerce have added this functionality within their development to cater for this functionality, simply said other plugins have not added this functionality to extend or customize their add-ons.
How can I make it work for other plugins?
The answer to this is hooks. The same way plugins "HOOK" onto wordpress, you can create a hook to do the same for the plugin. Have a search at "custom hooks"
This is because WooCommerce has implemented this functionality in their plugin.
Overwriting plugins is not a Wordpress core functionnality.
You can't overwrite a custom plugin, the only way is to duplicate his content creating a new plugin, and customize this new plugin made by yourself..
I'm currently developing a one page website using Wordpress and a custom theme and I'm struggling to understand how I can integrate WooCommerce checkout (and WooCommerce Booking plugin) on my index page, which contains everything rather than using /shop/ etc.
Is that even doable?
The website can be seen here: http://a-maze-in.com but the booking section is empty for now (it's live)
Any insight deeply appreciated.
Cheers.
[edit]
To be more specific, my question would be: How can I handle every step of the shop and checkout process on a single page? (that would be my index)
[/edit]
Turns out that my main problem was wp_footer(); missing from the footer.php page on my Custom theme. That little thing wasn't trigging the WooCommerce functionalities (and more specifically the functionnalities linked to the Bookings Plugin)
I've amended that and now it's working on my page. I still have a lot to figure out (like how can I do the checkout on that same page) but now I can work with that.
This is pretty straight forward. I've installed the Woocommerce Canvas theme and want to use it to implement an HTML template using the various hooks available. I've set my front-page to be the shop page but cannot seem to find the template which affects the shop page.
I have already tried to change both archive-product.php files, and neither are responding.
Managed to find it myself. The WP Cache plugin interfered.
I have created a custom module for the backend. Now I need to configure an admin template for my custom module.
I am able to create a new template for the frontend in magento. But I still don't understand, how to create a new theme for the admin side.
And also, I have designed my own header, footer and sidebars (left and right) for my new admin theme.
Can anyone help me with this?
See the following link from Inchoo. They have an excellent module solution for creating a custom admin theme, without chopping up the default one. Its ridiculously simple as well. Its also upgrade proof. I used it to add a few more attribute selections to the product list.
http://inchoo.net/ecommerce/magento/custom-admin-theme-in-magento/
You then just create your theme in /var/www/app/design/adminhtml/default/NAMEOFYOURTHEME
You can also just make css tweaks by adding /var/www/skin/adminhtml/default/NAMEOFYOURTHEME/custom.css (which is located in the default theme, so override it)