• Resolved flyfisher842

    (@flyfisher842)


    I thought there used to be a checkout now or shopping cart link on individual store pages so a customer could check out right after adding a product to the shopping cart. Did this not be there or did it go away in the last mp lite update.

    I don’t think having to look for a shopping cart link in the sidebar is very efficient.

    I did add a shopping cart link to the top menu using the links function which is ok but being able to check out from the product page would be better along with a continue browsing link on the product pages.

    If this is available in the settings page, please explain where.

    https://wordpress.org/plugins/wordpress-ecommerce/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @flyfisher842,

    Thank you for your question.

    There wasn’t any shopping cart link in the single product page byt you can add it by adding the following code in the functions.php file of your child theme or add it in your site using any of the following plugins.

    http://wordpress.org/plugins/code-snippets/
    http://wordpress.org/plugins/add-actions-and-filters/

    function product_the_content_filter($content) {
    
      if ( is_singular('product') ) {
        $content .= mp_cart_link(false);
      }
    
      return $content;
    }
    add_filter( 'the_content', 'product_the_content_filter' );

    Alternatively you can change “Checkout Button Type” from “Add To Cart” to “Buy Now” on all single product pages from the following path so that the user will immediately get redirected to shopping cart after clicking on the button.

    Admin Area -> Products -> Store Settings -> Presentation -> Single Product Settings

    Best Regards,
    WPMU DEV

    That’s cool. But it seems like it’s in the wrong place. Is there any way to place the link below the Add to Cart button? Or even after the categories at the bottom of the page. (Not in the footer.)
    Thanks!

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @flyfisher842,

    Thank you for your reply.

    To achieve this try using the following code replacing previously provided code.

    function product_cat_filter(  $return, $product_id, $before, $sep, $after ) {
    
      if ( is_singular('product') ) {
        $return .= '<br /><br />'.mp_cart_link(false);
      }
    
      return $return;
    }
    add_filter( 'mp_category_list', 'product_cat_filter', 10, 5 );

    Cheers,
    WPMU DEV

    No, that didn’t work for me. 🙁
    Nothing changed on the page at all.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @flyfisher842,

    It’s working fine on my site displaying “Shopping Cart” link below the product categories on single product page.

    Could you please use this code and provide me the product page link from your site so that i can test it?

    Regards,
    WPMU DEV

    Thread Starter flyfisher842

    (@flyfisher842)

    The second code block was installed in the functions file on a test site. I don’t see any Shopping Cart Link on any product page. It may be there and the co-ordinates need changing so it will display.

    http://www.fly-fishing-colorado.com/flyshopnew/

    Is there anything that need changing in the MP Lite setting page?

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @flyfisher842,

    Thank you for sharing the product page link.

    I could find out that in some cases the shopping cart link is not getting displayed.

    To resolve this issue try creating a functions.php file in the directory wp-content/mu-plugins( Create it if not exist ) containing the following code in it.

    if (!function_exists('mp_category_list')) :
    
    function mp_category_list($product_id = false, $before = '', $sep = ', ', $after = '') {
    		$terms = get_the_term_list($product_id, 'product_category', $before, $sep, $after);
    		if ($terms)
    				$return = $terms;
    		else
    				$return = __('Uncategorized', 'mp');
    
    		return apply_filters('mp_category_list', $return, $product_id, $before, $sep, $after);
    }
    endif;

    Best Regards,
    WPMU DEV

    Thread Starter flyfisher842

    (@flyfisher842)

    This last code and functions test displayed a blank page when attempting to go to a single product page.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @flyfisher842,

    The provided code is working fine on my test site.

    Please make sure you have copied the code correctly.

    If you still faces issue with it then can you please try enabling WP_DEBUG mode? To do this, just go to wp-config.php include this:

    define('WP_DEBUG',true);

    You might already have a line for WP_DEBUG, so just make sure it’s set to true.

    For information on this, checkout this wpmu.org article.

    Let me know what errors if any you are getting when you get the blank page after using the provided code.

    Regards,
    WPMU DEV

    Thread Starter flyfisher842

    (@flyfisher842)

    Please try this code your way using the Virtue theme and bullet proof security plugin enabled and let me know what happens before I mess with debug. Thanks.

    It is interesting that the MU folder is supposed to be for must use code in core.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @flyfisher842,

    I think you may be facing this issue due to not including the provided code in the php tags as following.

    <?php
    if (!function_exists('mp_category_list')) :
    
    function mp_category_list($product_id = false, $before = '', $sep = ', ', $after = '') {
    		$terms = get_the_term_list($product_id, 'product_category', $before, $sep, $after);
    		if ($terms)
    				$return = $terms;
    		else
    				$return = __('Uncategorized', 'mp');
    
    		return apply_filters('mp_category_list', $return, $product_id, $before, $sep, $after);
    }
    endif;
    ?>

    Are you talking about the latest versions of the following theme and plugin?

    https://wordpress.org/plugins/bulletproof-security/
    https://wordpress.org/themes/virtue

    You don’t need to mess with the debug, for this take a bit of wrong route as following.

    Try enabling WP_DEBUG mode and debug logging? To do this, just go to wp-config.php include this:

    define('WP_DEBUG',true);
    define('WP_DEBUG_LOG',true);

    You might already have a line for WP_DEBUG, so just make sure it’s set to true. This will create a log file under wp-content/debug.log with detailed information.

    If you’d like to avoid end users seeing error messages, you can include this as well:

    @ini_set('display_errors',0);
    define('WP_DEBUG_DISPLAY', false);

    This will prevent errors from being displayed, but you can still find them in the log file. For information on this, checkout this wpmu.org article.

    Regards,
    Vinod Dalvi

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘checkout link on product pages’ is closed to new replies.