Skip to content

Commit

Permalink
fixed product tag
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipsesrl committed Sep 5, 2019
1 parent 8dc2b62 commit b1cf55e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
6 changes: 5 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.udesly.com/
Tags: webflow to wordpress, editor, page builder, layout design, udesly, webflow
Requires at least: 5.0
Tested up to: 5.2.2
Stable tag: 2.0.0.21
Stable tag: 2.0.0.22
License: GPLv3 or later
License URI: https://www.udesly.com/terms-conditions-of-use/#udesly-wordpress-plugin
Requires PHP: 5.6.0
Expand Down Expand Up @@ -81,6 +81,10 @@ That's all!
Absolutely! You can use the Udesly Adapter to create more than one website.
== Changelog ==

= 2.0.0.22 =
* Fixed featured image on product_tag pages
* Added strongs on woocommerce template review-order

= 2.0.0.21 =
* Fixed frontend editor scripts

Expand Down
17 changes: 16 additions & 1 deletion includes/misc/terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,22 @@ function udesly_get_term_featured_image($term_id = null, $dimension = 'full', $o
}

if ($img_url == "" && ("product" == $type || $term->taxonomy === "product_tag" || $term->taxonomy === "product_cat")) {
$img_url = esc_url( wc_placeholder_img_src() );
if ($key == "_featured_image") {
$key = "thumbnail_id";
} else {
$key = "_featured_image";
}
$img = get_term_meta($term_id, $key, true);
if ($img) {
$dimension = apply_filters('udesly_get_term_featured_image_dimension', $dimension);
$img_url = wp_get_attachment_image_src($img, $dimension)[0];
}
else {
$img_url = "";
}
if ($img_url == "") {
$img_url = esc_url( wc_placeholder_img_src() );
}
}

return apply_filters('udesly_get_term_featured_image', $img_url, $term_id);
Expand Down
17 changes: 8 additions & 9 deletions templates/woocommerce/checkout/new-review-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@

global $udesly_checkout_classes;


?>
<div class="woocommerce-checkout-review-order-table <?php echo $udesly_checkout_classes['c']; ?>">

<div class="<?php echo $udesly_checkout_classes['l_i']; ?>">
<div class="product-name <?php echo $udesly_checkout_classes['l']; ?>"><?php _e( 'Product', 'woocommerce' ); ?></div>
<div class="product-total <?php echo $udesly_checkout_classes['l']; ?>"><?php _e( 'Total', 'woocommerce' ); ?></div>
<div class="product-name <?php echo $udesly_checkout_classes['l']; ?>"><strong><?php _e( 'Product', 'woocommerce' ); ?></strong></div>
<div class="product-total <?php echo $udesly_checkout_classes['l']; ?>"><strong><?php _e( 'Total', 'woocommerce' ); ?></strong></div>
</div>

<?php
Expand All @@ -53,13 +52,13 @@
?>

<div class="cart-subtotal <?php echo $udesly_checkout_classes['l_i']; ?>">
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><?php _e( 'Subtotal', 'woocommerce' ); ?></div>
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><strong><?php _e( 'Subtotal', 'woocommerce' ); ?></strong></div>
<div><?php wc_cart_totals_subtotal_html(); ?></div>
</div>

<?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
<div class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?> <?php echo $udesly_checkout_classes['c_w']; ?>">
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><?php wc_cart_totals_coupon_label( $coupon ); ?></div>
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><strong><?php wc_cart_totals_coupon_label( $coupon ); ?></strong></div>
<div><?php wc_cart_totals_coupon_html( $coupon ); ?></div>
</div>
<?php endforeach; ?>
Expand All @@ -76,7 +75,7 @@

<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
<div class="fee <?php echo $udesly_checkout_classes['c_w']; ?>">
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><?php echo esc_html( $fee->name ); ?></div>
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><strong><?php echo esc_html( $fee->name ); ?></strong></div>
<div><?php wc_cart_totals_fee_html( $fee ); ?></div>
</div>
<?php endforeach; ?>
Expand All @@ -85,13 +84,13 @@
<?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
<div class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?> <?php echo $udesly_checkout_classes['l_i']; ?>">
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><?php echo esc_html( $tax->label ); ?></div>
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><strong><?php echo esc_html( $tax->label ); ?></strong></div>
<div><?php echo wp_kses_post( $tax->formatted_amount ); ?></div>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="tax-total <?php echo $udesly_checkout_classes['l_i']; ?>">
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></div>
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><strong><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></strong></div>
<div><?php wc_cart_totals_taxes_total_html(); ?></div>
</div>
<?php endif; ?>
Expand All @@ -100,7 +99,7 @@
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>

<div class="order-total <?php echo $udesly_checkout_classes['l_i']; ?>">
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><?php _e( 'Total', 'woocommerce' ); ?></div>
<div class="<?php echo $udesly_checkout_classes['l']; ?>"><strong><?php _e( 'Total', 'woocommerce' ); ?></strong></div>
<div><?php wc_cart_totals_order_total_html(); ?></div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions udesly-adapter-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: Udesly Adapter
* Plugin URI: https://www.udesly.com
* Description: This is a support plugin for Udesly (Webflow to WordPress converter) that allows you to enable additional features for your theme.
* Version: 2.0.0.21
* Version: 2.0.0.22
* Author: Udesly
* Author URI: https://www.udesly.com
* License: GPL-2.0+
Expand All @@ -29,7 +29,7 @@
// Constants
defined('UDESLY_ADAPTER_PLUGIN_DIRECTORY_PATH') ?: define('UDESLY_ADAPTER_PLUGIN_DIRECTORY_PATH', plugin_dir_path(__FILE__));
defined('UDESLY_ADAPTER_PLUGIN_DIRECTORY_URL') ?: define('UDESLY_ADAPTER_PLUGIN_DIRECTORY_URL', plugin_dir_url(__FILE__));
defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.0.21");
defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.0.22");
defined('UDESLY_TEXT_DOMAIN') ?: define('UDESLY_TEXT_DOMAIN', "udesly-adapter-plugin");

defined('UDESLY_ADAPTER_PLUGIN_MISC_PATH') ?: define('UDESLY_ADAPTER_PLUGIN_MISC_PATH', plugin_dir_path(__FILE__) . 'includes/misc/');
Expand Down

0 comments on commit b1cf55e

Please sign in to comment.