compare.php
7 years ago
discount.php
7 years ago
general_settings.php
7 years ago
javascript_settings.php
7 years ago
mail.png
7 years ago
selected_products.php
7 years ago
settings.php
7 years ago
settings_footer.php
7 years ago
settings_head.php
7 years ago
style_settings.php
7 years ago
text_settings.php
7 years ago
selected_products.php
45 lines
| 1 | <div class="berocket_compare_widget_start"> |
| 2 | <?php |
| 3 | $products = BeRocket_Compare_Products::get_all_compare_products(); |
| 4 | $options = BeRocket_Compare_Products::get_compare_products_option ( 'br_compare_products_general_settings' ); |
| 5 | $text = BeRocket_Compare_Products::get_compare_products_option ( 'br_compare_products_text_settings' ); |
| 6 | |
| 7 | ?> |
| 8 | <?php if ( $title ) { |
| 9 | echo '<h3>'.$title.'</h3>'; |
| 10 | } ?> |
| 11 | <div class="berocket_compare_widget berocket_compare_widget_<?php echo $type; ?>" data-type="<?php echo $type; ?>"> |
| 12 | <ul> |
| 13 | <?php |
| 14 | if ( isset( $products ) && is_array( $products ) && count( $products ) > 0 ) { |
| 15 | foreach ( $products as $product ) { |
| 16 | $term = array(); |
| 17 | $current_language= apply_filters( 'wpml_current_language', NULL ); |
| 18 | $default_language= apply_filters( 'wpml_default_language', NULL ); |
| 19 | $product = apply_filters( 'wpml_object_id', $product, 'product', true, $current_language ); |
| 20 | $default_product = apply_filters( 'wpml_object_id', $product, 'product', true, $default_language ); |
| 21 | $post_get = wc_get_product($product); |
| 22 | if( empty($post_get) ) continue; |
| 23 | $title = $post_get->get_title(); |
| 24 | $image = $post_get->get_image(); |
| 25 | $link = $post_get->get_permalink(); |
| 26 | echo '<li class="br_widget_compare_product_'.intval($default_product).'">'; |
| 27 | echo '<a href="#remove" class="br_remove_compare_product" data-id="'.intval($default_product).'"><i class="fa fa-times"></i></a>'; |
| 28 | echo '<a href="'.$link.'">'; |
| 29 | if ( @ $type != 'text' ) { |
| 30 | echo $image; |
| 31 | } |
| 32 | echo '<span>'.$title.'</span>'; |
| 33 | echo '</a></li>'; |
| 34 | } |
| 35 | } |
| 36 | ?> |
| 37 | </ul> |
| 38 | <?php |
| 39 | $page_compare = $options['compare_page']; |
| 40 | if ( isset( $products ) && is_array( $products ) && count( $products ) > 0 ) { ?> |
| 41 | <a class="berocket_open_compare" href="<?php echo get_page_link($page_compare); ?>"><?php echo $text['compare']; ?></a> |
| 42 | <?php } ?> |
| 43 | </div> |
| 44 | </div> |
| 45 |