WordPress.org

Ready to get started?Download WordPress

Forums

TheCartPress eCommerce Shopping Cart
Products as Pages, not Posts (6 posts)

  1. Helen Bledsoe
    Member
    Posted 7 months ago #

    Hi again, could you please tell me how I can display the products as pages and not posts? The reason is that I don't want my product pages to display the sidebar items (widgets) that my blog post entries have. My pages, as opposed to my posts, are customized to have no sidebars, so I am guessing the easiest way to get rid of the sidebars in my shop is to display the products as pages.
    http://helenbledsoe.com/?tcp_product=seek-it-not-with-your-eyes&preview=true&preview_id=489&preview_nonce=d456bfba00

    http://wordpress.org/plugins/thecartpress/

  2. mikeotgaar
    Member
    Posted 7 months ago #

    You'll probably need to modify the plugin product template file
    single-tcp_product.php and archive-tcp_product.php

    There's 2 of each - Looks like you're using TwentyEleven WordPress theme so probably only need to do these.

    /wp-content/plugins/thecartpress/themes-templates/tcp-twentyeleven/single-tcp_product.php

    /wp-content/plugins/thecartpress/themes-templates/tcp-twentyeleven/archive-tcp_product.php

    The other 2 templates are in /wp-content/plugins/thecartpress/themes-templates/tcp-twentyten/

    Look for this line of code:
    <?php get_sidebar(); ?>
    and delete it completely (don't leave a blank line before the next statement ?php get_footer....)

    Near end of file (Line 26 in single-tcp_product.php - line 57 in archive-tcp_product.php)

    Backup those files first though - just in case!!

    You may need to do some CSS mods as well to fix content width

  3. Helen Bledsoe
    Member
    Posted 7 months ago #

    Hi, thanks! I do have 2011 but for some reason my files don't show a separate twentyeleven (or any twentyten) folder in /wp-content/plugins/thecartpress/themes-templates/.

    I did try this from what I have, but the sidebar still shows.
    from this:
    wp-content/plugins/thecartpress/themes-templates/tcp-single-product.php

    deleted this bit of text:
    <?php if ( is_active_sidebar( 'sidebar-buying-area' ) ) : ?>
    <div class="widget-area" role="complementary">
    <?php dynamic_sidebar( 'sidebar-buying-area' ); ?>
    </div><!-- #secondary -->
    <?php endif; ?>

    and from:
    wp-content/plugins/thecartpress/themes-templates/tcp-archive-product.php

    deleted this bit of text:
    <?php if ( is_active_sidebar( 'sidebar-layered' ) ) : ?>
    <div class="horizontal-layered">
    <?php dynamic_sidebar( 'sidebar-layered' ); ?>
    </div>
    <?php endif; ?>

  4. mikeotgaar
    Member
    Posted 7 months ago #

    @Helen Bledsoe

    Apologies - those templates were removed from v 1.3.2 onwards - forgot I'm using one of the earlier 1.2.* versions on my live site - just had too many problems with the later releases.

    Trying to find a solution on a testing site with the latest version...
    I've tried setting the products etc to use an alternative template - all it does is report the other templates are missing and continues to use the default template.

    Will see what I can figure out, and let you know

  5. mikeotgaar
    Member
    Posted 7 months ago #

    More info here:
    http://community.thecartpress.com/forums/topic/custom-templates-issue-with-1-3-3/

    Best option for now is to roll back the plugin to version 1.3 and not to update until this issue is fixed by the developer.

  6. sof
    Member
    Posted 1 month ago #

    Hi, i know this is too late but it's for ones who had same problem and couldn't figured it out
    all the help you need is on this page:
    http://thecartpress.com/docs/design-and-layout/extended-template-hierarchy-for-thecartpress/

    1- i copied page.php from my theme and renamed it to be: single-tcp_saleable.php (cause thecartpress search for specific templates, and when he find nothing he will write the content on page.php)so now we have created a template for him to put content on it rather than on page.php

    2- then i put the content of this page: tcp-single-product.php (which is on theme templates on thecartpress plugin directory, and ut's the page where single product detail is generated) between code of the new single-tcp_saleable.php page

    3- so we have then single-tcp_saleable.php with code from page.php (to be able to put or hide the sidebar and footer)and code from tcp-single-product.php(the core code of product detail page)

    when you refresh a product details page on your browser you will have it on the new template you just created, not anymore on page.php

    hope this helps, cause i need it too, and this new method wasted me so much time, bit am so happy i figured it out

Reply

You must log in to post.

About this Plugin

About this Topic