The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

updating info

itisnot_meitisnot_me Member
in Help edited December 2010
ok so lets say that the customer wants to add more seats to there subscription. how can i modify their sub_token to let them add more seats. i have tried to put the subtoken within the action url but i dont think that is how i should do that.

if they currently dont have additional seats added to their sub then i need to add it. If they already have add. seats then i know i can just send them to there subtoken so they can modify that.
  • itisnot_meitisnot_me Member
    edited December 2010
    also does the customer_id stay the same with there sub_token? or does it change with every transaction?
  • lukeluke FoxyCart Team
    Hey itisnot_me. Brett's response to this thread will probably be helpful:

    As for the customer_id, as long as they don't enter a new email address which would transfer the subscription to a new customer, then yes, the customer_id should stay the same. Subscriptions don't work with guest checkouts, a named customer with an account is required.
  • brettbrett FoxyCart Team
    @itisnot_me, sorry, I think I left another thread or two hanging from a while back. We've had a long month. (The whole internet has, it seems.)

    Are you asking about modifying an existing subscription? And are you talking about doing it for them or letting them do it themselves?

    If you want to do it yourself it's like that other forum thread. Load up the sub_token, then add the seats as needed. Then checkout using UOE. Same thing for the customer to do it themselves, but obviously without the UOE.

    The other option is the API, but that might be more advanced than you want to go.
  • its all cool. ive noticed that you guys are pretty busy. even with the whole black friday blackout.

    i dont want to have to touch the customers order. like a set it and forget it.

    i have been playing around with the whole thing and ive kind of gotten it but it is a little temperamental. when i load the sub_token with the form way and have a duplicate item in there it doesnt give me the "you are modifying a subscription" thing. it acts like it is a new order.

    also if i load up the sub_token and remove the base item that i have then just exit out with out doing anything else. then i load up the sub_token again the it doesnt have the actual order in it. like it remembers that i deleted the item. this is counter productive. Cause if i dont test out the little things then i know i will get those customers that will do it and then i will be s.o.l.
  • lukeluke FoxyCart Team
    If you remove the subscription item from a cart loaded up with a sub_token, you'll no longer be modifying the subscription. You'll have to add another subscription item (the new one) into your cart before you remove the old one in order to still modify the original subscription.
  • would it be possible to have the sub_token return to new if it is accessed again? cause with my type of subscriptions i cant trust that the customer will do as i please. in a perfect world they would do as we design. but my type of software has a bunch of people that are not all that great with a computer to begin with. trust me, my business partners mom has been testing it. lol
  • brettbrett FoxyCart Team
    trust me, my business partners mom has been testing it. lol
    Haha. Yeah. If I want to be told anything I do is horrible I only have to give it to my mom to usability test. She's a tough critic as well.

    I actually agree with you that it can be difficult because of the way the sub_token requires a subscription in the cart at all times for the sub_token to persist, but I also am not sure how it could be improved in a flexible and user-friendly way. Nor am I sure how to work around it at this point. Further complicating matters is that if you add a new subscription to a cart that has a sub_token in it, and add with an empty=true, it empties before adding, so the sub_token is removed.

    We'll discuss this to see if there's anything we can recommend.
  • Haha. Yeah. If I want to be told anything I do is horrible I only have to give it to my mom to usability test. She's a tough critic as well.
    ya but if we dont get it from that person then we would have some pissed off customers in the long run. and in the end we need

    i know its tricky. maybe you could pass a variable through to it so it always reverts. like token_reset=true. and maybe for the removing sub_token when putting empty=true we could just have that within the jquery where if it is passed it just removes it before running the rest of the script.

    idk if i am helping but it is just my thoughts as a php developer. i think that foxycart is still in the beginning and would like it to be the best around.

    also with the other post that i was asking about the script with disabling things it would be cool to implement that into foxy cart with a small part on the users end.

    p.s. im am in the planning process of trying to create a nice easy script that will make developing with foxycart a little more streamlined. Then if it works out then more business for ya faster.
  • brettbrett FoxyCart Team
    You're being helpful on all fronts. I'd whispered to Luke:
    The only thing I can think of would be to make the "you are currently modifying..." thing (with the sub_token itself) be persistent with the session unless the user clicked an "x" or something _in_ that message. Like, "You are currently modifying a subscription with a frequency of X UNITS, that will next process on YYYY-MM-DD. Any new X UNITS subscription added to your cart will have its date adjusted to match. If you would like to empty your cart and clear this subscription _click here_."

    The ability to explicitly remove a sub_token would help in that regard. I like your idea above. The thing we have to keep in mind is that you can still add non-recurring products to the cart, and you can also add _different_ / _new_ subscriptions to the cart. The flexibility afforded by our system and the huge variety in use cases makes it more difficult to come to the "right" default behavior.

    The other post about grouping: Yes, that's definitely been discussed, and is something we do plan on adding. It just hasn't been as big a priority as some other items, so we haven't had the chance to tackle it. We definitely appreciate your thoughts and comments though. That's what helps move us forward.
  • wait would you like me to whisper that to luke? would he know what it would be about? i tried reading it (seriously tried 4 and i dont fully understand it. ha

    well the thing about the "right" default behavior maybe shouldn't be default. i think all the options should be there and the user/developer will say which ones they want by adding a few lines of code or putting it in the url as variables, could be complex variables that can be grouped like sub_token=actual_subtoken-token_reset=true-sub_type=subscription, on the sub_type it could be only subscription or nonsub types or both. and for the url they could be separated by the -. then again we could just keep them as there own variables or as a piece in the cart with jquery. just just putting it out there as a option for grouping. That way it stays dynamic and you keep all options open. Instead of limiting one way with complex changes.

    I understand that there are more important things that need to be done than ones persons problems. but at least you want to add it. that is all i could ask for now.
  • also is there a distinct way to tell if the foxydata is an update of personal info, or a subtoken modify.

    on another note is there a thing that does not change within the whole customer data? Reason i ask is that depending on if they are a new customer or a previous one there are different actions and i determine this on their customer_id. but if they change the email to another person or just a new email like you said before the customer_id is not the same. So it would be processed as a new customer instead of a current one. this could cause problems.
  • lukeluke FoxyCart Team
    You can check the fc_json values. If there is only one product in the cart and the name of the product is "Update Your Customer Information" (or whatever you may have changed it to in your language settings) and the category is empty, then it's a customer update. For a subscription being modified via a sub_token, you'll see that the fc_json.messages array has a warning: "You are currently modifying a subscription."

    A thing that does not change? I'm not sure what you mean... but if you're referring to manging the data via the XML Datafeed after the transaction takes place, then you'll want to look at the is_anonymous XML node. That will tell you if they checked out as a guest or as an existing customer.
  • well i thought that there might of been a better way of determining if it is a update or a modify than what i did. what i did was if the product quantity is 0 then i have to only run one query but if it is >= 1 then i have to put the payment info into the payments table. it would be cool in the future if t could just come through as part of the xml data.

    what i mean is i grab the customer_id and put it into my db with the other info. so if they update there info or modify there sub it wont create a new set of info, it will just update what they have. but you mentioned that if they change their email then there customer_id changes. so this would cause a problem in just updating there info and changing there email. it would create a new set of info in the db instead of just updating it. so is there any identifier to determine if it is the same subscription with just changed info
    As for the customer_id, as long as they don't enter a new email address which would transfer the subscription to a new customer, then yes, the customer_id should stay the same. Subscriptions don't work with guest checkouts, a named customer with an account is required.
  • lukeluke FoxyCart Team
    Thanks for the feedback. We've been toying around with adding a "status" field on the transaction which you could update directly via the API that might be useful here. We could default it to "customer_update_complete" and "subscription_update_complete" or something like that.

    As for the other situation, I think you're describing a subscription transfer where someone transfers a subscription from one email address (or customer) to another. In that case, the key will still be the sub_token which will be unchanged since it's the same subscription.
  • itisnot_meitisnot_me Member
    edited December 2010
    for programming on my side it would be easier to have it as one field. like you stated you wanted to put a status. well the values could be customer_update or subscription_update. this would be easier cause i would only have to call it once a determine, based upon what value, what actions to do.

    unless that is exactly what you just said and my brain is mush. (which it could

    ok. i thought that the sub_token changed with a subscription transfer. that is an easy fix all i have to do is change my variables to check against the sub_token.

    i love it when problems can turn into solutions. we shot back some great ideas. and maybe some improvements to the 7.2 version. shoot ima come work for
Sign In or Register to comment.