PATH:
home
/
lab2454c
/
isaaclondston.com
/
wp-content
/
themes
/
divine_saint
/
woocommerce
<?php /** * The Template for displaying product archives, including the main shop page which is a post type archive * * This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce\Templates * @version 3.4.0 */ defined('ABSPATH') || exit; get_header(); ?> <div class="header__banner__main header__banner__inner header__banner__contact"> <div class="banner__content"> <div class="container"> <div class="banner__container__inner__noimage"> <h1><?php woocommerce_page_title();?></h1> </div> </div> </div> </div> <div class="body__container__wrapp body__container__inner"> <div class="product__wrapp"> <div class="tab__wrapp"> <ul> <?php $args = array( 'taxonomy' => 'product_cat', 'hide_empty' => true, ); $product_cat = get_terms($args); foreach ($product_cat as $parent_product_cat) { if (!empty($parent_product_cat)) { $thumbnail_id = get_term_meta($parent_product_cat->term_id, 'thumbnail_id', true); $image = wp_get_attachment_url($thumbnail_id); ?> <li> <a href="<?=get_term_link($parent_product_cat->term_id)?>"> <div class="image__box"> <img src="<?=$image?>" alt="" /> </div> <h3><?=$parent_product_cat->name?></h3> </a> </li> <?php } } ?> </ul> </div> <div class="product__video__wrapp"> <div class="container-xl container-lg container-fluid"> <div class="row"> <div class="col-xl-9 col-lg-9 col-md-9" style="margin: 0 auto 50px; text-align: -webkit-center;text-align:-moz-center;"> <?php the_field('product_page_video_section', 'option'); ?> </div> </div> </div> </div> <div class="product__list__wrapp"> <div class="container-xl container-lg container-fluid"> <div class="row"> <div class="col-xl-3 col-lg-3 col-md-3"> <div class="category__sidebar"> <h2>Categories</h2> <ul> <?php $args = array( 'taxonomy' => 'product_cat', 'hide_empty' => true, ); $product_cat = get_terms($args); foreach ($product_cat as $parent_product_cat) { if (!empty($parent_product_cat)) { ?> <li><a href="<?=get_term_link($parent_product_cat->term_id)?>"><?=$parent_product_cat->name?></a></li> <?php } } ?> </ul> </div> </div> <div class="col-xl-9 col-lg-9 col-md-9"> <div class="product__list__main"> <ul> <?php global $paged; $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $products = new WP_Query($args = array( 'post_type' => 'product', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => 12, 'taxonomy' => 'product_cat', 'paged' => $paged) ); if ($products->have_posts()): while ($products->have_posts()): $products->the_post(); ?> <li class="product__item"> <div class="thumb__wrapper"> <a href="<?php the_permalink();?>"> <div class="image__box"> <?php if (has_post_thumbnail($products->post->ID)) { echo get_the_post_thumbnail($products->post->ID, 'shop_catalog'); } else { echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" />'; } ?> </div> </a> <?php $terms = get_the_terms($products->ID, 'product_cat'); if (!empty($terms)) { foreach ($terms as $term) { ?> <span class="prod__cat__list"><?php echo $term->name; ?></span> <?php } } ?> <a href="<?php the_permalink();?>" class="loop__product__link"> <h3 class="product__title"><?php the_title();?></h3> <p> <?php echo get_field('pro_excerpt'); ?> </p> <?php if ($average = $product->get_average_rating()) : ?> <?php echo '<div class="star-rating" title="'.sprintf(__( 'Rated %s out of 5', 'woocommerce' ), $average).'"><span style="width:'.( ( $average / 5 ) * 100 ) . '%"><strong itemprop="ratingValue" class="rating">'.$average.'</strong> '.__( 'out of 5', 'woocommerce' ).'</span></div>'; ?> <?php endif; ?> <!-- <span class="price"><?php //echo $product->get_price_html(); ?></span> --> </a> <?php echo apply_filters( 'woocommerce_loop_add_to_cart_link', sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" class="button %s product_type_%s">%s</a>', esc_url( $product->add_to_cart_url() ), esc_attr( $product->get_id() ), esc_attr( $product->get_sku() ), $product->is_purchasable() ? 'add_to_cart_button' : '', esc_attr( $product->get_type() ), esc_html( $product->add_to_cart_text() ) ), $product ); ?> </div> </li> <?php endwhile; ?> <nav class="pagination"><?php pagination_bar($products);?></nav> <?php wp_reset_postdata(); //wp_reset_query(); endif; ?> </ul> </div> </div> </div> </div> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script> <script type="text/javascript"> $(window).on('load',function(){ var delayMs = 1000; // delay in milliseconds setTimeout(function(){ $('#myModal').modal('show'); }, delayMs); }); </script> <?php get_footer();
[+]
..
[+]
single-product
[-] archive-product.php
[edit]
[-] content-single-product.php
[edit]
[+]
checkout
[-] content-widget-reviews.php
[edit]
[+]
emails
[+]
auth
[-] product-searchform.php
[edit]
[-] content-widget-product.php
[edit]
[+]
loop
[+]
cart
[+]
global
[+]
myaccount
[-] content-product.php
[edit]
[-] single-product-reviews.php
[edit]
[-] content-widget-price-filter.php
[edit]
[-] content-product-cat.php
[edit]
[-] content-related.php
[edit]
[+]
notices
[+]
order
[-] taxonomy-product-tag.php
[edit]
[-] taxonomy-product-cat.php
[edit]
[-] single-product.php
[edit]