| 1 |
<?php |
| 2 |
/** |
| 3 |
* Layout: Single product. |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/orderable/layouts/product.php |
| 6 |
* |
| 7 |
* HOWEVER, on occasion Orderable 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 |
* @package Orderable/Templates |
| 14 |
* |
| 15 |
* @var array $category Category array. |
| 16 |
* @var WC_Product $product Product object. |
| 17 |
* @var array $args Array of args for the shortcode. |
| 18 |
*/ |
| 19 |
|
| 20 |
defined( 'ABSPATH' ) || exit; |
| 21 |
|
| 22 |
$class = Orderable_Layouts::get_product_card_classes( $args ); ?> |
| 23 |
|
| 24 |
<div class="<?php echo esc_attr( implode( ' ', $class ) ); ?>" |
| 25 |
<?php if ( ! empty( $args['card_click'] ) ) { ?> |
| 26 |
data-orderable-trigger="<?php echo esc_attr( $args['card_click'] ); ?>" |
| 27 |
data-orderable-product-id="<?php echo esc_attr( $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id() ); ?>" |
| 28 |
data-orderable-product-type="<?php echo esc_attr( $product->get_type() ); ?>" |
| 29 |
data-orderable-variation-id="<?php echo esc_attr( $product->is_type( 'variation' ) ? $product->get_id() : 0 ); ?>" |
| 30 |
data-orderable-variation-attributes="" |
| 31 |
<?php } ?> |
| 32 |
> |
| 33 |
<?php include Orderable_Helpers::get_template_path( 'templates/product/hero.php' ); ?> |
| 34 |
<div class="orderable-product__content-wrap"> |
| 35 |
<?php include Orderable_Helpers::get_template_path( 'templates/product/card-content.php' ); ?> |
| 36 |
<?php include Orderable_Helpers::get_template_path( 'templates/product/actions.php' ); ?> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
|