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

  1. clojel
    Posted 2 years 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.


  2. clojel
    Posted 2 years 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

  • Cart66 Lite :: WordPress Ecommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.