Giter Site home page Giter Site logo

my_account's People

Contributors

macbookandrew avatar perrytew avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

my_account's Issues

Cookie mismatch crossover from checkout api....

Hi again,

I 'm trying to get an integrated solution for our cart where a customer can bounce between account and checkout. When I log into a test customer account through the rest checkout api on our checkout page, I'm seeing a cookie populated named:

UltraCartShoppingCartId

Then, when I navigate to the customer account url, it's not recognizing the logged in status. Thus, there is a login box available on the my account page. So, after I log into the same account through the rest my account api on that page, two new cookies show up:

UltraCartMerchantID
UltraCartShoppingCartID

The case mismatch of the shopping cart id cookie names looks like it might be causing the issue. Not having the UltraCartMerchantID cookie set when I navigate from the checkout url could be causing an issue too though.

The cookie issue seemed like something that you would need to do on the UltraCart side of things, and not be something that I could affect. I could be completely wrong though.

Access to credit card info for card used with order...

Hi again,

Sorry, I seem to be racking up the issues here. :) This time we're wanting to get access to more info on the credit card used for a particular order. Specifically, the expiration and last-used dates. From what I can tell, the only credit card information available to me for a given order is the masked number and the card type. From this, it's possible that I could just compare the last 4 of the masked card number to those cards listed in the account and then display the associated information, but I'm not sure that this will always end up displaying the correct card (Am I wrong here? Or is the difference moot?)

Anyhow, I can see two possible solutions to this issue that would remove all doubt as to the question of displaying the correct information for the order:

  1. Adding all of the applicable credit card information for the card used on a particular order to the /rest/myaccount/orders response (probably overkill)

  2. Adding just the credit card id for the card used on a particular order to the /rest/myaccount/orders response. Then I'd just need to get a list of the account credit cards (easy) and find the appropriate card to display the necessary info by matching the id number of the card to that of the card id from the order.

Thanks.

Logging into customer account from main site...

Hi there. Another question. Probably a simple one. Of course now that I say that...

I'm trying to figure out how to allow a customer to log into their account from our website using this API.

I've got an implementation of the MyAccount API hosted on UltraCart's servers (https://secure.esupplements.com/my-account-dev/) that, when I login, /rest/myaccount/login returns response cookies with an associated domain of secure.esupplements.com. This is what I would expect.

I've got the proxy server file setup on our site server (http://www.esupplements.com) and it looks like everything is working, but the response cookies that I'm getting back from /rest/myaccount/login (UltraCartMerchantID & UltraCartShoppingCartID) have an associated domain of secure.ultracart.com.

I'm thinking that the reason this is happening (domain for UC cookies defaulting to secure.ultracart.com) is because I'm trying to log in from a non-secure domain. My question is, if I submit this request to /rest/myaccount/login from a securely-hosted version of our site (https://www.esupplements.com/ -- not currently available), will the cookies come back associated with the correct domain (https://www.esupplements.com/)?

I just want to be sure that this will work before I pass the word along that we need a secure server to do get the functionality that we want. Thanks.

Dan

Order count returning wrong number...

Hey,

I'm working on customizing our account implementation of the MyAccount REST API and noticed something funny. On the orders.html page, I'm getting a rendered value of 9 for the total number of orders made by my test account over the last 6 months. (This is the value of "totalRecords" within the orders collection, defined and populated within orders.js) This number may be entirely true of the number of orders initiated on that account within that time period, but I usually delete all of my test orders shortly after making them (so they don't accidentally get shipped by our shipping department -- a condition, I am sorry to say, that occurs all too frequently...).

Anyhow, the number of orders currently being returned on that page for that account (within the orders collection) is 1, which is what I expect. I've gotten around this problem for now by using the length of the "models" array within the orders collection instead of the value of the "totalRecords" field, but thought I'd mention it to you and see if perhaps this value were being calculated incorrectly.

Thanks.

Dan


Also (or more appropriately, I guess, randomly...) I noticed that the github link in the UltraCart docs for the MyAccount REST API at:

http://docs.ultracart.com/display/ucdoc/UltraCart+REST+MyAccount+API

is bad. The link is currently:

https://github.com/UltraCart/my_account/blob/master/js/myaccount_rest_1.0.js

Create Tickets

Currently the MyAccount API is designed to only allow Tickets to be created for a specific order. Ideally we would like to have the ability to create tickets in an situation. With or without a customer profile and with or without an order. This would allow us to create tickets for general support issues, for logged in customers to change a setting where we want to have a human element to review it, etc.

Tickets are currently managed here:

https://secure.ultracart.com/merchant/orderprocessing/casesLoad.do

Everything we need is there, just need the requirement for an Order ID and CustomerProfile (?) to be removed. Ideally we would like to be able to have this work via the MyAccount API as well.

Thanks in advance!

Customer login expiration?

Is there an expiration time set for a customer that logs in?

Say, for example, a customer logs in, forgets to log out, and then comes back a month later. Will a call to /rest/myaccount/loggedIn return that they're still logged in, or is there an expiration time set for being logged in? Or maybe, being logged in with no activity?

I'm setting a browser cookie upon customer login so that our main site can recognize that a customer is logged in without having to hit the UltraCart servers on every page load of our main site. (Probably a good thing for you guys, yeah? :) ) I'd like this cookie to expire at the same time as the loggedIn status of the customer on the UltraCart servers expires, and I figured I could either ask you for what it was, or just check semi-regularly (say once every day or so, for a given customer that stays logged in indefinitely).

It might be better to just check semi-regularly (in case you guys decide to change the expiration time for this), but thought I'd ask first.

Thanks.

Dan

DefaultImgUrl of items within an order not being served as secure...

So, this one is pretty self-explanatory from the title. When listing out the items contained within an individual order on the orders.html page of our implementation of the myaccount rest api, the values for:

defaultImgUrl

and

defaultThumbnailUrl

within the metaData object of the items object of the model of the given order (I know, lots of levels there...) both have urls that are non-secure. For the test order that I've created, the urls I'm seeing for these two values are:

"http://s3.amazonaws.com/ultracart/im/ESUP/3347CE94185978013CD09068E6051500?AWSAccessKeyId=0P4TXH5AKGYC8WHDZFG2&Expires=1388449326&Signature=yPEB%2FxrdLxHATygJkq2h32%2B3OJQ%3D"

and

"http://ultracartthumbs.s3.amazonaws.com/1360709037817/ESUP/4/A/80-80-4A24EC9FFD1A27F586D2DA7ACDA82FA1.jpg"

respectively.

Within the api cart, the item object for that same item contains values for:

defaultImgUrl

and

defaultThumbnailUrl

which are somewhat different and set to:

"http://secure.esupplements.com/itemmultimedia/ESUP/ES-ZYTENZ-1/bb-zytenz-1.jpg"

and

"https://secure.ultracart.com/thumbs/1360709037817/ESUP/4/A/80-80-4A24EC9FFD1A27F586D2DA7ACDA82FA1.jpg"

respectively; however, within our implementation of the api cart we are only using defaultThumbnailUrl. I'm guessing that this is because it's the only url of the two that is secure.

There doesn't seem to be a secure option for the item model available in the order object of the myaccount implementation though. Again, I may be entirely missing something.

Is there a setting in the UltraCart back end that causes all images to be served securely that we've missed? I guess I just expect that all of the images that we host on the UltraCart servers should be served as secure.

Any help would be appreciated.

Dan

Save first and last names on account creation...

There may already be a way to do this, but the method of application isn't obvious from the documentation:

http://docs.ultracart.com/display/ucdoc/UltraCart+REST+MyAccount+API#UltraCartRESTMyAccountAPI-/rest/myaccount/settings.1

The "customerInformation" information that gets passed in the call for account creation isn't detailed anywhere that I can find. In the myaccount Rest Api implementation here, that object has 3 fields:

email

password

merchantId

We'd like to be able to add firstName and lastName to that list and have them populate the appropriate fields of the new customer account. Is this a possibility? Thanks.

Dan

Creating a new user account...

Hi,

I'm trying to implement a custom cart for my Ultracart account using the REST MyAccount API and have run into a problem.

I'm trying to figure out how to create a new user account. I found the call for the in the API, but the example demo looks like it's using one of the built-in Ultracart pages to do this instead. I'd like to be able to customize mine if at all possible. I've looked at the createAccount function in the myaccount_rest_1.0.js file of the demo, but the customerInformation variable passed to it doesn't have a way (that I can see) to specify a password for the account when it's created. The object that is referenced in the API documentation says that the only way to "change" the password is to use the changePassword function and that passing a password to the API through that call will do nothing.

Essentially I want to be able to duplicate the functionality of "CREATE A CUSTOMER PROFILE" that's found on the page that loads up after clicking the "Checkout" button on this page: http://secure.ultracart.com/cgi-bin/UCEditor?merchantId=DEMO&ADD=BASEBALL and I can't see a way to do that using the API in the demo.

Thanks.

Dan Smyth

Site REST API call problems with states/provinces...

So I wasn't really sure where to post this one, as it's an issue with the site REST API and not really myAccount. Anyhow, I'm here. So...

I'm trying to take advantage of the Site REST API calls for states/provinces/codes and running into difficulties. I think this functionality is genius.

The first issue I'm having is that I can only seem to get a non-empty response for the /rest/site/stateProvinces API call for the US and Canada. So, I'm wondering if maybe this is an API call with an unfinished database behind it. I can't see that I'm doing anything wrong with the call, and everything works great for the US and Canada, so I'm at a bit of a loss as to what else might be going on.

The second issue I'm having is an apparent count difference between the /rest/site/stateProvinces and /rest/site/stateProvinceCodes responses. I'm grabbing both and trying to associate the code with the state and not having any luck. Again, it's looking like this is an issue caused by an incomplete database behind it.

Thanks.

Dan

Log in with Facebook

The client Iโ€™m building a site for would like her customers to be able to log in to their account using Facebook.

I've got the customer portal set up and working with standard login, but am trying to figure out how to use FB to log in. I have the FB app set up and can successfully authenticate against Facebook. Is it possible to use the FB token or generate some sort of key to use to log in to the customer portal?

Thanks

Question: Order status progress indicator...

So, we'd like to be able to implement an order status for customers to know how their order is developing. I haven't yet been given a very solid idea of how detailed we want this to be, but for now I can forsee three main designations/labels that could relay some good information to our customers:

Pending -- Order process has begun, payment processing is incomplete

Processed/Failed/Refunded/Canceled-- Result of payment processing

Shipped -- If payment was processed successfully, then the order has been shipped

In the UltraCart back-end order detail page, there are two lines in particular that I'm guessing could be helpful to my efforts in this regard:

Payment Status :Processed

Order Shipped - 12/18/2013 - Tracking #(blah)

This information seems to imply that my goal should probably be attainable.

In the Order object of the MyAccount REST API, I've found the following fields:

status -- Completed, Rejected, Quote Sent, Quote Requested, Pre-Order Item, Pending

shipOnDate(Formatted) -- When the order was (em)requested(/em) to ship on.

although, I'm not sure what the "status" values are actually referring to (payment/order/something-else) or of the significance of the emphasis on "requested" for shipOnDate(Formatted). I did notice that the "status" field is being used in the template for orders on the orders.html page, so I may be able to accomplish what I want just by using this single value, but I'm not sure. Also, I may be completely missing something else that would help.

Was hoping I could get some clarification on these two fields of the Order object, and possibly any other direction that you think may be of help if I am completely missing something..

Thanks.

Dan

PUT calls to /rest/myaccount/settings affecting account settings absolutely...

Calls to /rest/myaccount/settings using the updateSettings call within myaccount_rest_1.1.js file seem to be setting the MyAccount object values absolutely. Meaning, passing an object of "changes" that I want to make to an account's settings to /rest/mayaccount/settings results in almost all of the settings not listed within my "changes" object being set to what look like default values.

An example:

Setting all fields within the MyAccount object to some kind of value by defining a "changes" object:

var changes= {
    address1:'temp',
    address2:'temp',
    city:'temp',
    company:'temp',
    country:'temp',
    dayPhone:'888888',
    eveningPhone:'888888',
    fax:'888888',
    firstName:'temp',
    lastName:'temp',
    postalCode:'88888',
    state:'UT',
    taxId:'temp',
    title:'temp'
}

(customerProfile, email, merchantId, and password seem to be fine in this case)

Making a call to /rest/myaccount/settings with:

ultracart.myAccount.updateSettings(changes);

returns an object with exactly what I would expect:

{
    address1: "temp"
    address2: "temp"
    city: "temp"
    company: "temp"
    country: "temp"
    customerProfileOid: 1111111
    dayPhone: "888888"
    email: "[email protected]"
    eveningPhone: "888888"
    fax: "888888"
    firstName: "temp"
    lastName: "temp"
    merchantId: "DEMO"
    password: "********"
    postalCode: "88888"
    state: "UT"
    taxId: "temp"
    title: "temp"
}

The MyAccount object is completely populated. (Note: I've changed the values of the above object for customerProfileId, email, and merchantId to bogus values from what was actually returned for my specific account)

From this point, if I define a new empty object:

var newChanges= {}

meaning, I don't want to make any changes to the account settings, and then submit those changes via:

ultracart.myAccount.updateSettings(newChanges);

I get an object back that is stripped of almost all of it's data:

{
    address1: ""
    address2: ""
    city: ""
    company: ""
    country: ""
    customerProfileOid: 1111111
    dayPhone: ""
    email: "[email protected]"
    eveningPhone: ""
    fax: ""
    firstName: ""
    lastName: ""
    merchantId: "DEMO"
    password: "********"
    postalCode: ""
    state: ""
    taxId: null
    title: null
}

To verify that it wasn't just failing because I was passing it an empty changes object, I retried the above test with a single change included in the "changes" object:

var newChanges= {
    title : 'Mr.'
}

and then submitting it via:

ultracart.myAccount.updateSettings(newChanges);

I get returned to me:

{
    address1: ""
    address2: ""
    city: ""
    company: ""
    country: ""
    customerProfileOid: 1111111
    dayPhone: ""
    email: "[email protected]"
    eveningPhone: ""
    fax: ""
    firstName: ""
    lastName: ""
    merchantId: "DEMO"
    password: "********"
    postalCode: ""
    state: ""
    taxId: null
    title: "Mr."
}

Am I doing something wrong here? Some variable that I'm not passing correctly that is causing this behavior? I'm expecting the "changes" object to result in the defined changes being made to the account settings, but instead this api call seems to be looking for all of the settings to be defined in order to not have them set to default values.

From what I can tell in the documentation for this api call (http://docs.ultracart.com/display/ucdoc/UltraCart+REST+MyAccount+API#UltraCartRESTMyAccountAPI-/rest/myaccount/settings.2), it should be functioning like I'm expecting it to. It's just not. :)

If I'm wrong here, that's fine. Just let me know how I should be doing things instead and I'll change my methods accordingly.

Thanks a bundle.

Dan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.