• Hello

    How do u add QV to products that are not in conventional loop? The code below is what I have, just activating the plugin doesn’t work. This code is for 2 products on the linked page under “The latest from the estate”
    Any help appreciated. Thx

    <div class=”container featured-products df-product-add-to-cart-module”>
    <div class=”row”>
    <div class=”col-12″>
    <h2><?php the_sub_field(‘featured_products_headline’); ?></h2>
    <?php if ( get_field(‘sub_headline’) ) : ?>
    <p class=”sub-headline”><?php the_sub_field(‘sub_headline’); ?></p>
    <?php endif; ?>
    </div>
    </div>
    <?php if( have_rows(‘products’) ): ?>
    <div class=”row”>
    <?php
    // loop through the rows of data
    while ( have_rows(‘products’) ) : the_row();
    $product_obj = get_sub_field(‘product_select’);
    $product = wc_get_product( $product_obj->ID );
    // $product_image = wp_get_attachment_image_src( get_post_thumbnail_id( $product_obj ), ‘single-post-thumbnail’ );
    $product_image = get_sub_field(‘product_image’);
    $product_url = get_permalink( $product->get_ID() );
    $product_price = get_woocommerce_currency_symbol() . $product->get_price() . ‘ ‘ . get_woocommerce_currency();
    $product_pre_order = get_post_meta( $product->get_id(), ‘_wc_pre_orders_enabled’, true );
    ?>
    <div class=”df-product-add-to-cart-module col-6 product-column”>
    <div class=”product-image”>
    “>
    ” alt=””>

    <?php if ( $product->get_stock_quantity() != null && $product->get_stock_quantity() < 25 ): ?>
    <div class=”df-product-badge”>
    <svg class=”df-badge circle” width=”60″ height=”60″ viewBox=”0 0 60 60″>
    <path class=”shape” d=”M30,60A30,30,0,1,0,0,30,30,30,0,0,0,30,60″/>
    </svg>
    <p class=”message”><?php echo $product->get_stock_quantity(); ?> Left</p>
    </div>
    <?php elseif ( get_sub_field(‘show_badge’) ) : ?>
    <div class=”df-product-badge”>
    <?php if ( get_sub_field(‘badge_type’) == ‘circle’ ) : ?>
    <svg class=”df-badge circle” width=”60″ height=”60″ viewBox=”0 0 60 60″>
    <path class=”shape” d=”M30,60A30,30,0,1,0,0,30,30,30,0,0,0,30,60″/>
    </svg>
    <p class=”message”><?php the_sub_field(‘badge_text’); ?></p>
    <?php elseif ( get_sub_field(‘badge_type’) == ‘wavy’ ) : ?>
    <svg class=”df-badge star” width=”57.52″ height=”60″ viewBox=”0 0 57.52 60″>
    <path class=”shape” d=”M32.71.88,37,4a4.64,4.64,0,0,0,2.71.88h5.25A4.62,4.62,0,0,1,49.31,8l1.62,5a4.63,4.63,0,0,0,1.68,2.31l4.25,3.08a4.62,4.62,0,0,1,1.67,5.16l-1.62,5a4.66,4.66,0,0,0,0,2.86l1.62,5a4.62,4.62,0,0,1-1.67,5.16l-4.25,3.08A4.63,4.63,0,0,0,50.93,47l-1.62,5a4.62,4.62,0,0,1-4.39,3.19H39.67A4.64,4.64,0,0,0,37,56l-4.25,3.09a4.62,4.62,0,0,1-5.42,0L23,56a4.64,4.64,0,0,0-2.71-.88H15.08A4.62,4.62,0,0,1,10.69,52L9.07,47a4.63,4.63,0,0,0-1.68-2.31L3.14,41.58a4.62,4.62,0,0,1-1.67-5.16l1.62-5a4.66,4.66,0,0,0,0-2.86l-1.62-5a4.62,4.62,0,0,1,1.67-5.16l4.25-3.08A4.63,4.63,0,0,0,9.07,13l1.62-5a4.62,4.62,0,0,1,4.39-3.19h5.25A4.64,4.64,0,0,0,23,4L27.29.88a4.62,4.62,0,0,1,5.42,0″ transform=”translate(-1.24 0)”/>
    </svg>
    <p class=”message”><?php the_sub_field(‘badge_text’); ?></p>
    <?php endif; ?>
    </div>
    <?php endif; ?>
    </div>
    <p class=”product-description”><?php the_sub_field(‘product_description’); ?></p>
    <div class=”price-container”>
    <?php if ( wc_memberships_user_has_member_discount( $product->get_ID() ) ) : ?>
    <p class=”sale-info”><span class=”regular-price”>$<?php echo $product->get_regular_price() ?></span> <?php show_olive_oil_club_discount_message(); ?></p>
    <?php elseif ( $product->is_on_sale() ) : ?>
    <?php $discount_percentage = ( 1 – $product->get_price() / $product->get_regular_price() ) * 100; ?>
    <p class=”sale-info”><span class=”regular-price”>$<?php echo $product->get_regular_price() ?></span> <?php echo round($discount_percentage); ?>% Off</p>
    <?php endif; ?>
    <p class=”price”>
    <?php echo $product_price; ?>
    </p>
    </div>
    <div class=”product-buttons”>
    “><?php _e( ‘Learn More’, ‘domenicafiore’ ); ?>
    <?php if ( !$product->is_type(‘grouped’) ) : ?>
    get_ID() . ‘]’) ?>”>
    <?php
    if ( $product_pre_order === ‘yes’ ) {
    _e( ‘Pre-Order Now’, ‘domenicafiore’ );
    } else {
    _e( ‘Add to Basket’, ‘domenicafiore’ );
    }
    ?>

    <?php endif; ?>
    </div>
    </div>
    <?php
    wp_reset_postdata();
    endwhile;
    ?>
    </div>

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Leanza Francesco

    (@leanzafrancesco)

    Hi,
    and thank you for writing in!

    To achieve your goal you can use the [yith_quick_view] shortcode.
    For example, if you want to show the quick view button for the product #12, you can use the following shortcode:
    [yith_quick_view product_id="12"]

    So, in your case, you could use it in PHP, as follows:

    
    $quick_view_shortcode = '[yith_quick_view product_id="' . $product_id . '"]';
    echo do_shortcode( $quick_view_shortcode );
    

    where $product_id is the variable containing the ID of your product.

    Please try this solution and let us know if everything works fine!

    Thread Starter kabira604

    (@kabira604)

    Awesome that worked.

    One more thingg

    How close(design wise) can I get the pop up to? https://www.dropbox.com/sh/uovdyy58b5eacol/AAA3JzV-JieRrGzUmwfRo5wPa?dl=0&preview=DF_QuickView_Mockup_083121.xd

    You can see how it looks rn on the site.

    Thx

    Plugin Support Leanza Francesco

    (@leanzafrancesco)

    Hi,

    you could get a similar style by adding the following CSS to Appearance > Customize > Additional CSS

    #yith-quick-view-modal .yith-quick-view-overlay{
        background: rgba(0,0,0,0.3);
    }
    
    #yith-quick-view-modal .yith-wcqv-main{
        border: 2px solid #999;
        box-shadow: 0px 1px 18px 0 rgba(0,0,0,0.12);
        border-radius: 15px;
        overflow: visible;
    }
    
    #yith-quick-view-modal #yith-quick-view-content{
        overflow-y: auto;
        border-radius: 15px;
    }
    
    #yith-quick-view-modal.open .yith-wcqv-main{
        overflow: visible;
    }
    
    #yith-quick-view-close{
        background: #000;
        opacity: 1;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        border: none;
        box-shadow: 0 0 0 4px rgba(0,0,0,0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff !important;
        top: -17px;
        right: -17px;
    }

    About the “close” icon, you could set your custom one, for example by using an icon font.

    Thread Starter kabira604

    (@kabira604)

    Thanks.

    One more thing, thhx

    The plus-minus signs aren’t showing in product quantity?

    Also how can we match their design with here: https://developmentdf.wpengine.com/product/reserva-500ml/

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,
    please try with following CSS code.

    .yith-quick-view-content .quantity.buttons_added input[type=button].minus {
        width: 30px;
        height: 36px;
        font-size: 37px;
    }
    
    .yith-quick-view-content .quantity.buttons_added input[type=button].plus {
        width: 30px;
        height: 30px;
        font-size: 25px;
    }
    
    .yith-quick-view-content .quantity.buttons_added input.qty.text {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to embedd in custtom pulled products?’ is closed to new replies.