roots / sage-woocommerce

WooCommerce integration for Sage 9 themes
212 stars 56 forks source link

Not ovveride cart template #21

Open r-chrzan opened 4 years ago

r-chrzan commented 4 years ago

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?

benfavre commented 4 years ago

You don't need the "template" subfolder

Le lun. 13 janv. 2020 à 23:36, r-chrzan notifications@github.com 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 .

JAMM-daw commented 4 years ago

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

JAMM-daw commented 4 years ago

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

mtx-z commented 4 years ago

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

r-chrzan commented 4 years ago

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.

jackrobson commented 3 years ago

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.