• Resolved arioman

    (@arioman)


    hi , i need to move the add to cart & price under product gallery ( image )

    i`m familiar with Design and Css but i think i must move the code and lines for get better result specially for Have a Responsive website

    so i rather to not use Position: absolute option to move them.

    anyone can Guide or idea how can i do this ?

    i upload an screenshot to make it more clear here

    thank u so much

    • This topic was modified 6 years, 6 months ago by arioman.
    • This topic was modified 6 years, 6 months ago by arioman.
Viewing 8 replies - 1 through 8 (of 8 total)
  • hi there
    you can do that by going to
    plugins\woocommerce\templates\single-product

    and open file named price.php

    then cut out this code
    <p class="price"><?php echo $product->get_price_html(); ?></p>

    then go to this file “same path also” product-image.php

    and add the previous code under this one

    		echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id );
    
    		do_action( 'woocommerce_product_thumbnails' );
    		?>

    hope that’s helped you

    sorry I didn’t notice the add to cart part

    to move it under the price go to
    plugins\woocommerce\templates\single-product\add-to-cart

    and open variation-add-to-cart-button.php

    and add the whole code under

    echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id );
    
    		do_action( 'woocommerce_product_thumbnails' );
    		?>
                   <p class="price"><?php echo $product->get_price_html(); ?></p>

    and try to play with the code to get the best of it

    Thread Starter arioman

    (@arioman)

    wow , thank u so much for spend time and guide me completely

    i never can figure it out without your help my friend.

    ** Only one problem and it`s weird

    i cut all code from variation-add-to-cart-button.php and past it on product-image.php

    but now i have 2 add to cart button in my page and it`s duplicated , this problem is not exist for price

    because you have to remove it from variation-add-to-cart-button.phpleave the variation-add-to-cart-button.php blank with no code in it

    Thread Starter arioman

    (@arioman)

    i 100% sure that i remove everything from variation-add-to-cart-button.php

    i search for $product->get_min_purchase_quantity() and find out there is same code in another file called “simple.php”

    so after i make it blank too , the problem solved

    i just want to sure s this ok to Delete the content of simple.php ?

    hi there
    just remove this code form simple.php

    
    		?>
    
    		<button type="submit" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button button alt"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
    
    		<?php
    

    and don’t forget to keep me informed if its works ??

    Thread Starter arioman

    (@arioman)

    thank u so much , it works without any problem now

    you are welcome any time ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘single Product How move cart & price under gallery?’ is closed to new replies.