Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2011
    Posts
    2
    Plugin Contributions
    0

    Default Passing values from another page...

    Very new to zen cart and what I am trying to do is this...

    I would like to pass values from a previous page, quantity, size, color...ect from a jquery calculator that I have made. I would like to have these values transfer to a product check-out page in zen cart. So on the calculator page you hit a buy button and the quantity, color...ect transfers to the check-out page for the customers convenience.

    Can this be done using GET? and if so how do I do this?


    Thanks

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Passing values from another page...

    It sounds as though you're collecting information via a form (albeit one that's javascript enhanced) and want to use that information elsewhere.

    You don't say whether your submitting the form directly to the place where you want to use it, or whether collection and use are separate.

    Either way, there's no a short, easy paragraph that will make this easy for you and you'll need to have a good understanding of how web forms work.

    I recommend that you start there. This link is a good resource for getting inside the topic => http://www.w3schools.com/html/html_forms.asp. Once you understand the basics, that would be the time to understand how they apply to a complex structure like Zen Cart.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    Plugin Contributions
    0

    Default Re: Passing values from another page...

    Here is the code i am using to change the link based on the product. Is there a way(first if statement as an example) to change the cart_quantity by changing the URL?

    <a id="myLink" href="http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=1>Order This Product!</a>

    if (size == '24x14'){
    $("#myLink").attr("href", "http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=1&amp;cart_quantity=quantit y");
    }

    if (size == '24x16'){
    $("#myLink").attr("href", "http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=2");
    }

    if (size == '26.5x16'){
    $("#myLink").attr("href", "http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=3");
    }

    if (size == '26.5x20'){
    $("#myLink").attr("href", "http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=4");
    }

    if (size == '30x20'){
    $("#myLink").attr("href", "http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=5");
    }

    if (size == '32x20'){
    $("#myLink").attr("href", "http://mysite.com/zencart/index.php?main_page=product_info&cPath=1&products_id=6");
    }

 

 

Similar Threads

  1. v154 Passing variables FROM the store TO another portion of site
    By ShortHorse in forum General Questions
    Replies: 0
    Last Post: 26 Jun 2015, 06:02 PM
  2. v151 Passing values between pages - Confused
    By Earthenware in forum General Questions
    Replies: 5
    Last Post: 28 Jan 2014, 06:13 PM
  3. passing parameters from poduct info page to shopping cart.
    By gmartakis in forum General Questions
    Replies: 11
    Last Post: 3 Jul 2013, 05:06 AM
  4. Passing price from HTML page
    By Scarlet in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 18 Sep 2009, 06:36 PM
  5. Passing a hidden customer_id to another php file
    By Somerschool in forum General Questions
    Replies: 7
    Last Post: 12 May 2009, 07:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg