sage-woocommerce icon indicating copy to clipboard operation
sage-woocommerce copied to clipboard

Not ovveride cart template

Open r-chrzan opened this issue 5 years ago • 6 comments

Hi, i have a problem with ovveride cart template I tried structure like /woocommerce/template/cart/cart.blade.php and /woocommerce/cart/cart.blade.php but still not work. Is displayed as page default form the theme.

Any ideas?

r-chrzan avatar Jan 13 '20 12:01 r-chrzan

You don't need the "template" subfolder

Le lun. 13 janv. 2020 à 23:36, r-chrzan [email protected] a écrit :

Hi, i have a problem with ovveride cart template I tried structure like /woocommerce/template/cart/cart.blade.php and /woocommerce/cart/cart.blade.php but still not work. Is displayed as page default form the theme.

Any ideas?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/roots/sage-woocommerce/issues/21?email_source=notifications&email_token=AAFCIZ6VHD5AGMG7ZUXNHE3Q5RN5XA5CNFSM4KGBPAG2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFXS7WA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFCIZZA2MMN6RM52H3KHF3Q5RN5XANCNFSM4KGBPAGQ .

benfavre avatar Jan 14 '20 07:01 benfavre

Hello, I have same problem. I just have /resources/woocommerce/cart.blade.php but override is not working.

JAMM-daw avatar Feb 07 '20 09:02 JAMM-daw

Also when I replicate the structure /cart/cart.blade.php I get 408 request timeout

JAMM-daw avatar Feb 07 '20 10:02 JAMM-daw

I'm able to override the cart template using wp-content/themes/my-theme/resources/views/woocommerce/cart/cart.blade.php.

mtx-z avatar Feb 07 '20 13:02 mtx-z

Everything works with using default editor with shortcode like [cart] in specyfic page. In my case in folder views/woocommerce/cart/cart.blade.php and works perfectly.

r-chrzan avatar Feb 07 '20 13:02 r-chrzan

I had the same problem.

The significant detail is knowing the woocommerce cart page is meant to use the default page template.

Your page.blade.php template must echo the content...

@php the_content() @endphp

Which then allows the [woocommerce_cart] shortcode to be shown...

The shortcode itself relies on the templates in the woocommerce/cart folder.

jackrobson avatar Mar 30 '21 14:03 jackrobson