WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] single-product.php (4 posts)

  1. moon pwint
    Member
    Posted 8 months ago #

    I used woocommerce for my store.
    Last time I can edit single-product.php and can arrange product description and additional infromation position.
    Now I'm doing for new project. I only can find
    <?php woocommerce_get_template_part( 'content', 'single-product' ); ?>
    instead of <?php woocommerce_get_template( 'single-product/short-description.php' ); ?>
    <?php woocommerce_get_template( 'single-product/tab/description.php' ); ?>
    I have no idea where can I edit for single-product page.
    Help me !

    http://wordpress.org/plugins/woocommerce/

  2. jameskoster
    Member
    Plugin Author

    Posted 8 months ago #

    The file you're looking for is content-single-product.php.

    You can find all the single product template files in templates/single-product/.

  3. moon pwint
    Member
    Posted 8 months ago #

    I finding php code to build single product page.

  4. moon pwint
    Member
    Posted 8 months ago #

    For example :
    <?php get_header();$product = get_product($post->ID);?>
    <div id="inner-content">
    <div class="field field_02">
    <div class="content">
    <div class="p-page-holder l-grid">
    <div class="product-page-left">
    <div class="product-image">

    <div class="img-wrapper"><?php woocommerce_show_product_images(); ?></div>

    <?php
    $attachment_ids = $product->get_gallery_attachment_ids();
    if ( $attachment_ids ) :
    ?>

    <div class="prod-gallery">

    <div class="content_slide_box">
    <div class="content_slide_holder">
    <?php do_action( 'woocommerce_product_thumbnails' ); ?>
    <br style="clear:both;">
    </div>
    </div>

    </div>
    <?php endif; ?>

    </div>

    </div>

    <div class="product-page-right">

    <?php woocommerce_get_template( 'single-product/short-description.php' ); ?>

    </div>
    <?php woocommerce_get_template( 'single-product/tabs/description.php' ); ?>
    <?php woocommerce_related_products(80,0); ?>
    <div style="display: none">
    <script type="text/javascript">
    (function ($) {
    $(document).ready(function(){
    $(".latest-products").each(function () {
    if ($(this).find(".product").length > 3) {
    $(this).parent().find(".late-prod-nav a").show();
    } else {
    $(this).parent().find(".late-prod-nav a").hide();
    }
    });

    $(".latest-prod").serialScroll({
    target: '.content_slide_box',
    items: '.product',
    prev: '.late-prod-nav a.icons-left-arrow',
    next: '.late-prod-nav a.icons-right-arrow',
    margin: true,
    axis: 'xy',
    duration: 700,
    force: true,
    exclude: 2
    });

    <?php if(get_option("woocommerce_enable_lightbox") == "no"): ?>
    $("div.thumbnails").find("a").click(function(e){
    e.preventDefault();
    $("div.images").find("img").attr("src",$(this).attr("href"));
    });
    <?php endif; ?>
    });
    })(jQuery);
    </script>
    </div>
    </div>
    <div style="clear: both;"></div>
    </div>
    </div>
    </div>

    <?php get_footer();?>

Reply

You must log in to post.

About this Plugin

About this Topic