Skip to content

Instantly share code, notes, and snippets.

@hiranthi
Created April 9, 2013 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiranthi/5344006 to your computer and use it in GitHub Desktop.
Save hiranthi/5344006 to your computer and use it in GitHub Desktop.
Add a product to the wishlist from the cart page.
<?php
// load product, should be inside the cartitem loop
shopp('storefront','product','load=true&id=' . shopp('cartitem','product','return=true'));
// then place the add-to-wishlist link/checkbox where you want it -> inside that same loop (options below)
shopp('wishlist-pro','add-button','options');
// Options:
# type - link | checkbox
# before - add something before the link/checkbox
# after - add something after the link/checkbox
# add - text to use for the add-to-wishlist link/checkbox-label
# listed - text to use for when the product is already listed
# linklisted - whether to link the listed text or not (the link will be to remove the product from the wishlist)
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment