external.php
3 years ago
grouped.php
3 years ago
simple.php
3 years ago
variable.php
4 years ago
variation-add-to-cart-button.php
3 years ago
variation.php
5 years ago
external.php
33 lines
| 1 | <?php |
| 2 | /** |
| 3 | * External product add to cart |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/single-product/add-to-cart/external.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 7.0.1 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | do_action( 'woocommerce_before_add_to_cart_form' ); ?> |
| 21 | |
| 22 | <form class="cart" action="<?php echo esc_url( $product_url ); ?>" method="get"> |
| 23 | <?php do_action( 'woocommerce_before_add_to_cart_button' ); ?> |
| 24 | |
| 25 | <button type="submit" class="single_add_to_cart_button button alt<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>"><?php echo esc_html( $button_text ); ?></button> |
| 26 | |
| 27 | <?php wc_query_string_form_fields( $product_url ); ?> |
| 28 | |
| 29 | <?php do_action( 'woocommerce_after_add_to_cart_button' ); ?> |
| 30 | </form> |
| 31 | |
| 32 | <?php do_action( 'woocommerce_after_add_to_cart_form' ); ?> |
| 33 |