This topic has 13 replies, 3 voices, and was last updated 5 years ago ago by Olga Barlow
Hello,
I would like to change the price position in the quick view popup. Right now it shows below product title and I want it to show above the cart button. I need some code like the following but for the quick view pop up:
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 20 );
Thanks
Hello,
We don’t use these hooks in the quick view. Copy xstore/woocommerce/product-quick-view.php file to child theme. Edit it and move the price code to the necessary position http://prntscr.com/paddoz
I have passed idea to change the position of the elements in quick view to our developers, so we’ll add this in one of the next theme updates.
Regards
Can you please tell where to find xstore folder? I can’t find it in wp-content, wp-admin or wp-includes. Thanks
In wp-content/themes/ I only have these three folders:
/twentynineteen
/twentyseventeen
/twentysixteen
No Xstore folder.
Hello,
Are you sure that you are talking about your installation? It’s not possible that you don’t have xstore folder if you use our theme http://prntscr.com/pawfbt
Regards
Hello,
Already found xstore folder. I wasn’t looking at the right place. Thank you!
I made the change in the code but still not working. Price is still under product title. This is my product-quick-view.php code after suggested change:
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $product, $etheme_global, $post;
$product_settings = etheme_get_option('quick_view_switcher');
$zoom = etheme_get_option('zoom_effect');
if( class_exists( 'YITH_WCWL_Init' ) ) {
add_action( 'woocommerce_single_product_summary', function () { echo do_shortcode( "[yith_wcwl_add_to_wishlist]" );}, 31 );
}
remove_all_actions( 'woocommerce_product_thumbnails' );
$etheme_global['quick_view'] = true;
if( get_option('yith_wcwl_button_position') == 'shortcode' ) {
add_action( 'woocommerce_after_add_to_cart_button', 'etheme_wishlist_btn', 30 );
}
$class = '';
if ( etheme_get_option('quick_view_layout') == 'centered' ) $class = 'text-center';
if ( etheme_get_option('quick_images') == 'slider') $class .= ' swipers-couple-wrapper swiper-entry arrows-hovered';
$product_class = array();
$product_class[] = 'product-content';
$product_class[] = 'quick-view-layout-' . etheme_get_option( 'quick_view_layout' );
$product_class[] = ( $product->is_sold_individually() ) ? 'sold-individually' : '' ;
?>
<div <?php wc_product_class( $product_class, $product ); ?> >
<div class="row">
<?php if (etheme_get_option('quick_images') != 'none'): ?>
<div class="col-lg-6 col-sm-6 product-images <?php echo esc_attr($class); ?>" data-image_height="<?php echo esc_attr( etheme_get_option('quick_image_height') ); ?>">
<?php
if (etheme_get_option('quick_images') == 'slider'): ?>
<?php
/**
* woocommerce_before_single_product_summary hook
*
* @hooked woocommerce_show_product_sale_flash - 10
* @hooked woocommerce_show_product_images - 20
*/
do_action( 'woocommerce_before_single_product_summary' );
?>
<?php else: ?>
<?php the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) ); ?>
<?php endif; ?>
</div><!-- Product images/ END -->
<?php endif; ?>
<div class="col-lg-<?php if (etheme_get_option('quick_images') != 'none'): ?>6<?php else: ?>12<?php endif; ?> col-sm-6 product-information <?php if (!in_array('quick_categories', $product_settings)) { echo 'hide-categories'; } ?>">
<?php if (in_array('quick_product_name', $product_settings)): ?>
<h3 class="product-name"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php endif ?>
<div class="quick-view-info">
<?php if (in_array('quick_rating', $product_settings)): ?>
<?php woocommerce_template_single_rating(); ?>
<?php endif ?>
<?php if (in_array('quick_short_descr', $product_settings)): ?>
<?php woocommerce_template_single_excerpt(); ?>
<?php endif ?>
<?php if (in_array('quick_price', $product_settings)): ?>
<?php woocommerce_template_single_price(); ?>
<?php endif; ?>
<?php do_action( 'et_quick_view_swatch' ); ?>
<?php
if (in_array('quick_add_to_cart', $product_settings)) {
if ( etheme_get_option('just_catalog') ) {
echo sprintf( '<div class="cart"><a rel="nofollow" href="%s" class="button single_add_to_cart_button show-product">%s</a></div>',
esc_url( $product->get_permalink() ),
__('Show details', 'xstore')
);
}
else {
if( $product->get_type() == 'simple' ) {
woocommerce_template_single_add_to_cart();
} else {
woocommerce_template_loop_add_to_cart();
}
}
}
woocommerce_template_single_meta();
?>
<?php if ( in_array('quick_share', $product_settings)) : ?>
<div class="product-share">
<?php echo do_shortcode('[share title="' . esc_html__( 'Share:', 'xstore' ) . '" text="' . get_the_title() . '"]'); ?>
</div>
<?php endif ?>
</div>
<?php
$length = etheme_get_option( 'quick_descr_length' );
$length = ( $length ) ? $length : 120;
$description = etheme_trunc( etheme_strip_shortcodes(get_the_content()), $length );
$description = trim($description);
?>
<?php if (etheme_get_option( 'quick_descr' ) && !empty( $description )): ?>
<div class="quick-view-excerpts">
<div class="excerpt-title"><?php esc_html_e('Details', 'xstore'); ?></div>
<div class="excerpt-content">
<div class="excerpt-content-inner">
<?php echo wp_kses_post($description); ?>
</div>
</div>
<?php if (in_array('product_link', $product_settings)): ?>
<a href="<?php the_permalink(); ?>" class="show-full-details"><?php esc_html_e('Show full details', 'xstore'); ?></a>
<?php endif; ?>
</div>
<?php elseif (in_array('product_link', $product_settings)): ?>
<a href="<?php the_permalink(); ?>" class="show-full-details"><?php esc_html_e('Show full details', 'xstore'); ?></a>
<?php endif; ?>
</div><!-- Product information/ END -->
</div>
</div> <!-- CONTENT/ END -->
Hello,
Provide us with temporary wp-admin and FTP access so we can take a closer look.
Regards
OK here I send you the access.
I have a few more questions:
1- The Quick View Dimensions (Width And Height) option doesn’t change the size of the quick view frame when I set a width or height value. I need more height.
2- I need to change the font size of the price but ONLY FOR MOBILE VERSION. I need it bigger. How can I make that? I set this code in Global Custom CSS for price font costumization, but in addition to this I need an specific code only for mobile font size.
.woocommerce-Price-amount {
color: #000000 !important;
font-size:16px !important;
font-weight: bold !important;
}
3- It is possible that every time that I update the theme the translation I did with Loco translate don’t get lost?
Thank you!
Hello,
product-quick-view.php file should be placed in woocommerce folder of your child theme.
1. I do not see the problem – http://prntscr.com/pbmg6h Please check one more time.
2. Theme Options > Custom CSS > Custom CSS for Mobile area.
3. Translation files should be placed in /wp-content/languages/themes/ folder with correct names http://prntscr.com/pbmhrj
Let us know if this doesn’t solve the problem. Don’t forget to backup all the files before any update.
Also, please create new topics for new questions, do not use 1 thread for different problems because it can cause a mess or delay in answering. Thanks in advance.
Regards
Hello Rose,
Thank you very much!
1. My mistake, I was setting the value without “px”, that’s why it didn’t work.
2. OK
3. Done.
Thanks!
Hello,
You’re welcome!
Is there anything else I can help you with?
Regards
Everything solved. Thank you
You are welcome.
Regards
The issue related to '‘change price position en quick view popup’' has been successfully resolved, and the topic is now closed for further responses