-
I need help; I haven't been able to find the file to modify the Ajax Cart, which appears as a modal. Similarly, I'm facing the same issue with the profile. If someone could assist me, I would appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Both, cart and user appears as offcanvas not as modal. Guess that you want to change the offcanvas into a modal, right? If so, you have to edit several files. Note that this is a sensitive area and there will be changes in near future. CartAJAXhttps://github.com/bootscore/bootscore/blob/main/woocommerce/inc/ajax-add-to-cart.php Create folder in your child and copy file to it:
Override function with new path in your child's functions.php: function register_ajax_cart() {
require_once('woocommerce/inc/ajax-add-to-cart.php');
}
add_action('after_setup_theme', 'register_ajax_cart'); Now you can edit this file in your child. Offcanvashttps://github.com/bootscore/bootscore/blob/main/template-parts/header/offcanvas-woocommerce.php Override this file as a usual template file by copying to your child. Offcanvas cart togglerhttps://github.com/bootscore/bootscore/blob/main/template-parts/header/actions-woocommerce.php Override this file as a usual template file by copying to your child. UserSame files as above:
Solved? |
Beta Was this translation helpful? Give feedback.
Ok, now I understand. User offcanvas content is stored in https://github.com/bootscore/bootscore/blob/main/woocommerce/myaccount/my-account-offcanvas.php.
This isn't a WooCommerce template file and cannot be overridden in the normal way. You have to copy and link it in your child.
my-account-offcanvas.php
to your child using the same folder structure as in main-theme.offcanvas-woocommerce.php
and in line22
you will find this:bootscore/template-parts/header/offcanvas-woocommerce.php
Line 22 in 7d7fbac