New Landing How can we help? Themeforest Theme Support Joyn How to decrease checkout page 'you might also like'

Viewing 15 posts - 1 through 15 (of 26 total)
  • Posted in: Joyn
  • #137385
    mhote
    Member
    Post count: 394

    Hi – to test this, please add a blue product to cart ie.

    http://hoteliyo.com/estore/hotel-brand-membership-template/

    then on this page: http://hoteliyo.com/estore/cart/

    You’ll see the ‘you may also like’ are in 2 columns and have huge tiles

    How can we get this section to only display like normal ie

    How it looks on: http://hoteliyo.com/estore/hotel-brand-membership-template/

    Thanks!

    #137407
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Your URLs are giving 404 error.
    Thanks
    Mohammad

    #137408
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137411
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Your URL still gives 404 error. I see that you have bulk of issues. Have you setup your theme correctly?
    Thanks
    Mohammad

    #137413
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137467
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit cart.php at /joyn/woocommerce/cart/.

    Find this code:-
    <div class="cart-collaterals">
    	
    		<?php do_action('woocommerce_cart_collaterals'); ?>
    	
    	</div>
    
    Change to :-
    <div class="cart-collaterals">
    global $product, $woocommerce, $woocommerce_loop;
    
    $upsells = $product->get_upsells();
    
    if ( sizeof( $upsells ) == 0 ) return;
    
    $meta_query = $woocommerce->query->get_meta_query();
    
    $args = array(
    	'post_type'           => 'product',
    	'ignore_sticky_posts' => 1,
    	'no_found_rows'       => 1,
    	'posts_per_page'      => $posts_per_page,
    	'orderby'             => $orderby,
    	'post__in'            => $upsells,
    	'post__not_in'        => array( $product->id ),
    	'meta_query'          => $meta_query
    );
    
    $products = new WP_Query( $args );
    
    //$woocommerce_loop['columns'] 	= $columns;
    $woocommerce_loop['columns'] = 4;
    
    if ( $products->have_posts() ) : ?>
    
    	<div class="upsells products">
    		
    		<h4 class="lined-heading"><span><?php _e( 'You may also like&hellip;', 'swiftframework' ) ?></span></h4>
    				
    		<?php woocommerce_product_loop_start(); ?>
    
    			<?php while ( $products->have_posts() ) : $products->the_post(); ?>
    
    				<?php woocommerce_get_template_part( 'content', 'product' ); ?>
    
    			<?php endwhile; // end of the loop. ?>
    
    		<?php woocommerce_product_loop_end(); ?>
    		
    	</div>
    
    <?php endif;
    
    wp_reset_postdata();
    </div>

    Thanks
    Mohammad

    #137481
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137498
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I see that you have removed all theme js files to load so this error coming.
    Thanks
    Mohammad

    #137501
    mhote
    Member
    Post count: 394

    Hi Mohammad – I’m not sure what you mean… can you explain? Thank you

    #137503
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I checked the cart page and found that you have removed all theme js files.
    Thanks
    Mohammad

    #137505
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137510
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please roll back all changes as i suggested you in cart.php.
    Thanks
    Mohammad

    #137627
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #137649
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    There were some code errors so i corrected.Please open to edit cart.php at /joyn/woocommerce/cart/.

    Find this code:-
    <div class="cart-collaterals">
        
            <?php do_action('woocommerce_cart_collaterals'); ?>
        
        </div>
    
    Change to :-
    <div class="cart-collaterals">
    <?php 
    global $product, $woocommerce, $woocommerce_loop;
    
    $upsells = $product->get_upsells();
    
    if ( sizeof( $upsells ) == 0 ) return;
    
    $meta_query = $woocommerce->query->get_meta_query();
    
    $args = array(
        'post_type'           => 'product',
        'ignore_sticky_posts' => 1,
        'no_found_rows'       => 1,
        'posts_per_page'      => $posts_per_page,
        'orderby'             => $orderby,
        'post__in'            => $upsells,
        'post__not_in'        => array( $product->id ),
        'meta_query'          => $meta_query
    );
    
    $products = new WP_Query( $args );
    
    //$woocommerce_loop['columns'] 	= $columns;
    $woocommerce_loop['columns'] = 4;
    
    if ( $products->have_posts() ) : ?>
    
        <div class="upsells products">
            
            <h4 class="lined-heading"><span><?php _e( 'You may also like&hellip;', 'swiftframework' ) ?></span></h4>
                    
            <?php woocommerce_product_loop_start(); ?>
    
                <?php while ( $products->have_posts() ) : $products->the_post(); ?>
    
                    <?php woocommerce_get_template_part( 'content', 'product' ); ?>
    
                <?php endwhile; // end of the loop. ?>
    
            <?php woocommerce_product_loop_end(); ?>
            
        </div>
    
    <?php endif;
    
    wp_reset_postdata();
    ?>
    </div>

    Thanks
    Mohammad

    #137656
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register