Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default passing parameters from poduct info page to shopping cart.

    Hi,
    I want to pass some parameters to shopping cart page. More specifically I want to pass productId from product info so the link when it goes to shopping cart changes something like that:

    index.php?main_page=shopping_cart&cPath=36_42&products_id=103

    instead of

    index.php?main_page=shopping_cart

    Could you please tell how to accoplish this?
    Thank you

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: passing parameters from poduct info page to shopping cart.

    Quote Originally Posted by gmartakis View Post
    Hi,
    I want to pass some parameters to shopping cart page. More specifically I want to pass productId from product info so the link when it goes to shopping cart changes something like that:

    index.php?main_page=shopping_cart&cPath=36_42&products_id=103

    instead of

    index.php?main_page=shopping_cart

    Could you please tell how to accoplish this?
    Thank you
    Sorry, but I'm not quite following what you are trying to do.

    Exactly what is the problem that you are trying to solve?

    Cheers
    Rod

  3. #3
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: passing parameters from poduct info page to shopping cart.

    I'm trying to pass the product id parameter to http://www.domainexample.com/index.p...=shopping_cart in order to do same changes to the cart. I cannot get the Product id with $_GET[products_id]; or with a different way like $_SESSION[products_id];. Therefore I'm trying to find other ways to accomplish that. Could you help me?

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: passing parameters from poduct info page to shopping cart.

    Quote Originally Posted by gmartakis View Post
    I'm trying to pass the product id parameter to http://www.domainexample.com/index.p...=shopping_cart in order to do same changes to the cart. I cannot get the Product id with $_GET[products_id]; or with a different way like $_SESSION[products_id];. Therefore I'm trying to find other ways to accomplish that. Could you help me?
    Apologies. I understand what it is you are asking for, the problem is I don't quite understand exactly why you feel/think there is a need to do this.

    Feel free to tell me to mind my own business, or say it isn't important that I know, I don't have an problem with that.

    It is simply because this is a very unusual request, that I can't help thinking that there may be another option open to you, something that doesn't require code hacking, and it would be amiss of me to help you down a path to possible further problems if there is no need to do so.

    Cheers
    Rod

  5. #5
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: passing parameters from poduct info page to shopping cart.

    Hi Rod,
    I'm using a module stock by attributes my site is www.sellisbike.gr/demo and I would like to display for every option availability you can see my product info http://www.sellisbike.gr/demo/index....roducts_id=102 this is how I display my product_info page. I would like to do the same for my shopping cart but I cannot accomplish that if can pass the product id variable to the tpl_shopping_cart_default.php. Simple what I did is to copy a piece of code from the stock by attribute code and transform it the way I want to.

    Now what I want from you is to tell me how I could pass product Id variable to shopping_cart page.
    Please Reply ASAP.
    Regards
    Ioannis

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: passing parameters from poduct info page to shopping cart.

    Quote Originally Posted by gmartakis View Post
    Now what I want from you is to tell me how I could pass product Id variable to shopping_cart page.
    Please Reply ASAP.
    Regards
    Ioannis
    I've just taken a *very quick* look at the variables, etc available on the product_info page and didn't spot anything there that would be useful to you.

    I do have another suggestion for you though, since you can't (apparently) pass this value *to* the shopping cart page, you could modify the shopping_cart page itself and perform a check on the HTTP_REFERER variable, which would read something like
    http://yourdomain.com/index.php?main...roducts_id=102

    You can then extract the product_id from the path and use it as needed.

    I've no idea what repercussions you may experience as a result of what you are trying to do... For all i know there may not be any. I guess you'll find that out for yourself when the time comes. :)

    lemme know if it does work though, because I'm somewhat curious. I really didn't see the point when you 1st asked, but now I've seen your page(s) I see where you are heading.. It could be useful if it works as expected.

    The biggest 'problem' I see is that this will only work for the product as it is added to the cart.

    Cheers
    Rod

  7. #7
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: passing parameters from poduct info page to shopping cart.

    Thanks for the quick prompt Rod,
    I will try this....I'm not sure how I'm going to do it. Anyway I have another problem that it's bothering me a lot since I created this site...
    I'm trying to display manufacturer filter in product listing. But even if I enable it from the admin panel...the alpha sorter filter is showing what ever I do. I tried to fix it but with no luck.....any suggestions?
    Regards
    Ioannis

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: passing parameters from poduct info page to shopping cart.

    Quote Originally Posted by gmartakis View Post
    . I tried to fix it but with no luck.....any suggestions?
    Sorry, none at this time.

    Cheers
    Rod.

    ps. It might pay to open a new thread for this question. More people are likely to see it.

  9. #9
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: passing parameters from poduct info page to shopping cart.

    I did print what you said to my tpl_shopping_default.php page echo $_SERVER['HTTP_REFERER'];
    it prints the URL of the product_info page....it's good...Well I dont know how to extract this values from this URL any advice would be great my friend...
    Regards,
    Ioannis

  10. #10
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: passing parameters from poduct info page to shopping cart.

    any advice here would be crusial here.
    Thanks again
    Regards
    Ioannis

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Add multiple text fields to poduct info page
    By Kevin205 in forum General Questions
    Replies: 1
    Last Post: 20 Apr 2013, 06:01 AM
  2. Passing customer info from store to paypal
    By Gomlers in forum PayPal Express Checkout support
    Replies: 6
    Last Post: 6 Aug 2011, 09:44 PM
  3. Remove right sidebox shopping cart from when on shopping cart page
    By alterego55 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Oct 2010, 01:45 AM
  4. Passing parameters
    By EVerlastx1 in forum General Questions
    Replies: 7
    Last Post: 20 Nov 2006, 09:34 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