Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /var/www/web284/html/wp-content/themes/splendor/woocommerce/ |
Current File : //var/www/web284/html/wp-content/themes/splendor/woocommerce/content-product.php_ |
<?php /** * The template for displaying product content within loops. * * Override this template by copying it to yourtheme/woocommerce/content-product.php * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly global $product, $woocommerce_loop, $post; // Store loop count we're currently on if ( empty( $woocommerce_loop['loop'] ) ) $woocommerce_loop['loop'] = 0; // Store column count for displaying the grid if ( empty( $woocommerce_loop['columns'] ) ) $woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 3 ); // Ensure visibility if ( ! $product->is_visible() ) return; // Increase loop count $woocommerce_loop['loop']++; // Extra post classes $classes = array(); if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns'] ) $classes[] = 'first'; if ( 0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns'] ) $classes[] = 'last'; if ($woocommerce_loop['columns'] == 4) {array_push($classes, "span3 sp_filt");}; if ($woocommerce_loop['columns'] == 3) {array_push($classes, "span4 sp_filt");}; ?> <?php global $woocommerce; if(count($woocommerce->cart->cart_contents) > 0){ $prod_array = array(); foreach($woocommerce->cart->cart_contents as $key=>$val){ $prod_array[] = $val['product_id']; } } ?> <div <?php post_class( $classes ); ?>> <?php do_action( 'woocommerce_before_shop_loop_item' ); ?> <div class="sp_thumb"> <div class="sp_featured_img"> <?php /** * woocommerce_before_shop_loop_item_title hook * * @hooked woocommerce_show_product_loop_sale_flash - 10 * @hooked woocommerce_template_loop_product_thumbnail - 10 */ do_action( 'woocommerce_before_shop_loop_item_title' ); ?> </div> <div class="thumbnails"> <a class="sp_product_title" href="<?php the_permalink(); ?>"> <?php $attachment_ids = $product->get_gallery_attachment_ids(); if ( $attachment_ids ) { $loop = 0; foreach ( $attachment_ids as $attachment_id ) { $image = wp_get_attachment_image( $attachment_id, 'large'); $loop++; if ($loop == 1){ print_r ($image); } } } else { ?> <a class="sp_featured_image_link" href="<?php the_permalink(); ?>"></a> <?php } print_r ($image_link); ?> </a> </div> <?php if( is_array($prod_array) && in_array($product->id,$prod_array)){ ?> <div class="added_to_cart"> </div> <?php }?> </div> <div class="product_cont"> <a class="sp_product_title" href="<?php the_permalink(); ?>"> <h5><?php the_title(); ?></h5> </a> <hr style="margin-top:5px; margin-bottom:7px;"> <p> <?php $string = get_the_excerpt(); $result = implode(array_slice(explode('<br>',wordwrap($string,60,'<br>',false)),0,1)); echo $result; if($result!=$string)echo'...'; ?> </p> <?php /** * woocommerce_after_shop_loop_item_title hook * * @hooked woocommerce_template_loop_price - 10 */ do_action( 'woocommerce_after_shop_loop_item_title' ); ?> <hr style="margin-top:5px; margin-bottom:15px;"> <?php do_action( 'woocommerce_after_shop_loop_item' ); ?> </div> </div>
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare