PATH:
home
/
lab2454c
/
gemiton.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"> <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__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 $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $args = array( 'post_type' => 'product', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => 9, 'taxonomy' => 'product_cat', 'paged' => $paged ); $products = new WP_Query( $args ); if ( $products->have_posts() ) : while ( $products->have_posts() ) : $products->the_post(); ?> <li class="product__item"> <div class="thumb__wrapper"> <a href="#"> <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> <?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> </div> <div class="buttons__wrapper"> <?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"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 363.4 453.4" style="enable-background:new 0 0 363.4 453.4;" xml:space="preserve"> <path d="M352.1,453.4c-100.5,0-241,0-341.6,0c-0.1-0.8-0.7-0.9-1.3-1.2c-6.3-3-9.2-8-9.2-14.9c0-87.1,0-244.1,0-331.2 c0.1-9.8,6.3-16,16.2-16.1c13.3,0,46.7-0.2,60,0.1c3.6,0.1,4.7-1,5.2-4.5c9.4-61.6,74.7-101,133.3-79.8 c37.7,13.7,60.3,40.9,67.5,80.6c0.5,2.7,1.2,3.8,4.3,3.8c13.8-0.2,47.7-0.1,61.5-0.1c8.9,0,15.4,6.4,15.4,15.3 c0,87.6,0,245.1,0,332.7c0,3.3-1,6.3-2.8,9.1C358.5,450.3,355.1,451.5,352.1,453.4z M181.6,423.5c42.8,0,105.5,0,148.3,0 c2,0,3.6,0.4,3.6-2.8c-0.1-76-0.1-221.9,0-297.9c0-2.2-0.4-3-2.8-2.9c-8,0.2-36,0.2-43.9,0c-2.6-0.1-3.3,0.6-3.3,3.2 c0.2,13.5,0.1,26.9,0.1,40.4c0,9.5-6.1,16.2-14.8,16.3c-8.8,0.1-15.1-6.7-15.1-16.3c0-13.5-0.1-26.9,0.1-40.4c0-2.7-0.7-3.2-3.3-3.2 c-45.8,0.1-91.5,0.1-137.3,0c-2.7,0-3.3,0.7-3.2,3.3c0.1,13.5,0.1,26.9,0.1,40.4c0,9.5-6.2,16.2-14.8,16.3 c-8.8,0.1-15.1-6.7-15.1-16.4c0-13.2-0.1-26.4,0.1-39.7c0-2.9-0.4-4.1-3.7-3.9c-7.6,0.3-35.2,0.3-42.8,0c-3.1-0.1-3.5,1-3.5,3.7 c0.1,75.5,0.1,220.9,0,296.4c0,3,0.9,3.6,3.7,3.6C76.3,423.5,138.9,423.5,181.6,423.5z M252.2,89.9c-3.3-27.5-29.9-60.2-71.4-59.7 c-41,0.5-66.6,33.4-69.5,59.7C158.3,89.9,205.2,89.9,252.2,89.9z" /> </svg></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->product_type ), esc_html( $product->add_to_cart_text() ) ), $product );?> <a href="<?php the_permalink(); ?>"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 357.4 172.2" style="enable-background:new 0 0 357.4 172.2;" xml:space="preserve"> <path d="M353.8,77.6c-0.1-0.1-0.1-0.1-0.2-0.1c0-0.1-0.1-0.1-0.1-0.2L279.8,3.6c-4.8-4.8-12.6-4.8-17.4,0c-4.8,4.8-4.8,12.6,0,17.4 l52.9,52.9h-303C5.5,73.8,0,79.3,0,86.1v0c0,6.8,5.5,12.3,12.3,12.3h303.3l-52.9,52.9c-4.8,4.8-4.8,12.6,0,17.4 c4.8,4.8,12.6,4.8,17.4,0l73.7-73.7C358.6,90.1,358.6,82.4,353.8,77.6z" /> </svg> </a> </div> </li> <?php endwhile; wp_reset_postdata(); //wp_reset_query(); endif; ?> </ul> <nav class="pagination"><?php pagination_bar( $products ); ?></nav> </div> </div> </div> </div> </div> </div> </div> <?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]