Support » Plugin: Cart66 Lite :: WordPress Ecommerce » Link(s) in cart: cart66-lite

Viewing 1 replies (of 1 total)
  • 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…

Viewing 1 replies (of 1 total)
  • The topic ‘Link(s) in cart: cart66-lite’ is closed to new replies.