WordPress.org

Ready to get started?Download WordPress

Forums

Cart66 Lite :: WordPress Ecommerce
Link(s) in cart: cart66-lite 1.5.1.8 (2 posts)

  1. clojel
    Member
    Posted 1 year ago #

    Product links in shopping cart do not link to respective product posts. Instead, they link to home url. Product links in cart can be enabled at Cart66 > Cart & Checkout tab.

    Wonder if anyone had similar issue.

    http://wordpress.org/extend/plugins/cart66-lite/

  2. clojel
    Member
    Posted 1 year ago #

    On closer look, product url come from hidden input submitted together with "Add to cart" button. The code was found at line 38, views/cart-button.php
    <input type='hidden' name='product_url' value='<?php echo Cart66Common::getCurrentPageUrl(); ?>' />

    Product URL is correct when a product is added to cart from the product page. When adding to cart from elsewhere (eg index, categroy, tag or search results pages), product URL would be wrongly refer to referer page instead of actual product post.

    A quick fix would be modifying the above code:
    <input type='hidden' name='product_url' value='<?php echo esc_url( get_permalink() ) ; ?>' />

    A more comprehensive approach could be reviewing getCurrentPageUrl in models/Cart66Common.php. Appreciate your work...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.