Code Library: GET

variables from url query strings

GET  Description URL
change template for the session, e.g. href="/?template_id=3" Must be via home page at / /
change user currency for the session using Country Codes. E.g. /currency/?currency_id=121 sets currency to NZD (or can be as the three digit unit e.g. /currency/?currency_id=NZD). Add $_GET['default'] to save if user logged in: /currency/?currency_id=121&default=1 /currency/
add all children of a product. E.g. /order/?all_parent_product_id=247 adds all child products with qty 1. /order/?all_parent_product_id=247&qty=3 adds all child products with qty 3. /order/?all_parent_product_id=247&qty=0 removes all child products for product_id 247. /order/
E.g. /order/?buynow=27 adds product_id 27 to cart and checks out with that product only

Add multiple buy now products with qty: /order/?buynow=27,3x28,2x29,30,35 buy now for 5 products with product_id's comma separated and the qty (optional) first.
add an item to Buy Later. E.g. /order/?later=25 adds product_id 25 to Buy Later list /order/
move from Buy Later to cart /order/
empty Buy Later /order/
copy an item from Buy Later to cart without removing it from Buy Later /order/
remove item from Buy Later list E.g. /order/?later_forget=24 removes product_id 24 /order/
E.g. /order/?product_id=22 adds product_id 22 to cart and stays on the /order/ page

Add multiple products to cart: /order/?product_id=22,3x28,2x29,30,35 adds 5 products to cart with (optional) qty as first parameter, and stays on the /order/ page. Note if no qty is supplied the qty will be 1
remove an item from cart. E.g. /order/?remove=25 removes product_id 25 from cart /order/
split product in cart into separate rows where qty is more than one. E.g. /order/?split=4 /order/
move item to cart from wish list E.g. /order/?wish_addtocart=4 /order/
remove item from wish list E.g. /order/?wish_forget=5 removes product_id 5 /order/
where a page has multiple pages in results sets the page's results from value, default is 0. E.g. /search/?vq=all&from=25 starts results from the 25th product /search/
set user layout to grid or list with values 'g' or 'l'. Can be used on category or search pages: /shop/category-books?layout_view=g or /search/vq=books&?layout_view=g /search/
set the number of products per page on category and product pages, e.g. /search/?vq=books&limit=250 or /shop/category-books?limit=250 /search/
/search/?vq=all&price=12 shows all products around $12
/search/?vq=all&price=under5 shows all products under $5
/search/?vq=all&price=over20 shows all products over $20
/search/?vq=all&price=10-20 shows all products over $10 and under $20
alternatively use "to":
/search/?vq=all&price=10to20 shows all products over $10 and under $20
set the sort order of products on search and category pages, default is best_match e.g. /search/?vq=all&sort=inc_price values include best_match, inc_price, dec_price, inc_name, created (desc e.g. newest first) /search/
search term e.g. /search/?vq=books /search/