Possible Basket information error in Order API

This is an archive of old posting to the User Forum

Possible Basket information error in Order API

Postby PROLOG Newsgroups » Wed Apr 23, 2003 2:59 pm

Hi,

I'm new to Shopsite, but have been asked by a client to look into a possible
problem with a custom script that is being executed through the Order API.
It is used to send a fax with the order information. The problem occurs very
randomly, so it's been difficult to track down what is happening.

Based on the API specifications, in the Basket Information section, the
individual ordered items are identified by a prefix of B01-Bxx. This custom
script accurately pulls all the order information, using the field names as
specified in the Order API specs, with the exception of the individual order
items. Most of the time, that is correct, too, but randomly it "drops" some
of the items, as though it can't locate the parameters based on B01-Bxx
prefixes. The email that is sent by the order system, and the order db shows
ALL the items were ordered, but they are not appearing on this fax. And
again, only very randomly does this happen.

The last time was 2 days ago - the client placed a duplicate "test" order
immediately afterwards, with the exact same items that the customer had
ordered - and the fax was generated accurately.

I'm wondering if it's possible that under certain conditions, the Basket
Information MIGHT be generated without the leading zero on the parameter
field name prefixes (i.e., B5 instead of B05)? This is the only thing I can
come up with to explain what is happening, but can't duplicate it "on
demand" so I can't prove it. I was just wondering if anyone else has
experienced this or anything similar within their Order API scripts.

Also - is there any file that could be viewed (log or db) that would show
the B-value names that were generated during the order process? Or are those
removed once the order is completed.

Sorry for being so verbose, and also if my terminology isn't "SS-friendly".
I am a cgi programmer, but have no experience with ShopSite per-say.

Thank you,
PROLOG Newsgroups
 

Re: Possible Basket information error in Order API

Postby loren_d_c » Wed Apr 23, 2003 3:37 pm

B01 to B09 have the 0 after the B, any more items than this will leave the 0
out, so you will have B10, B11, etc. I have never heard of the 0 randomly being
dropped from the variable names.

I do know that on older versions there is a possibility of non-consecutive Bxx
sections, though, if the shopper removed an item from the cart. For example,
Item 1, Item 2, and Item 3 are placed in the cart, shopper later removes Item 2
and then finishes the order. In those older versions, this would leave you with
B01 and B03 sections in the Order API output. This should be easy enough to test
for in your Bxx loop, just do a test on one of the variables that should always
have something in it like Bxx-Name, if it is null then you know there is no Bxx
section with that number, so you can increment your counter and continue on with
the next section.

I believe this was fixed in v6 so that there would always be consecutive Bxx
sections, to help make looping easier.

-Loren




PROLOG Newsgroups wrote:

Hi,

I'm new to Shopsite, but have been asked by a client to look into a possible
problem with a custom script that is being executed through the Order API.
It is used to send a fax with the order information. The problem occurs very
randomly, so it's been difficult to track down what is happening.

Based on the API specifications, in the Basket Information section, the
individual ordered items are identified by a prefix of B01-Bxx. This custom
script accurately pulls all the order information, using the field names as
specified in the Order API specs, with the exception of the individual order
items. Most of the time, that is correct, too, but randomly it "drops" some
of the items, as though it can't locate the parameters based on B01-Bxx
prefixes. The email that is sent by the order system, and the order db shows
ALL the items were ordered, but they are not appearing on this fax. And
again, only very randomly does this happen.

The last time was 2 days ago - the client placed a duplicate "test" order
immediately afterwards, with the exact same items that the customer had
ordered - and the fax was generated accurately.

I'm wondering if it's possible that under certain conditions, the Basket
Information MIGHT be generated without the leading zero on the parameter
field name prefixes (i.e., B5 instead of B05)? This is the only thing I can
come up with to explain what is happening, but can't duplicate it "on
demand" so I can't prove it. I was just wondering if anyone else has
experienced this or anything similar within their Order API scripts.

Also - is there any file that could be viewed (log or db) that would show
the B-value names that were generated during the order process? Or are those
removed once the order is completed.

Sorry for being so verbose, and also if my terminology isn't "SS-friendly".
I am a cgi programmer, but have no experience with ShopSite per-say.

Thank you,
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Possible Basket information error in Order API

Postby Sharon » Thu Apr 24, 2003 1:44 pm

That was definitely it. We tried the same problem order, but deleted an item
in the basket before checking out - and the Order API script dropped the
items AFTER the deleted item. The script was expecting sequential B#'s, and
this version of ShopSite didn't resequence them after the item was deleted.

So - we've got that fixed and it's working fine.

Thanks so much for your help!!

Sharon

"Loren" <loren_d_c@yahoo.com> wrote in message
news:3EA715BE.7A791967@yahoo.com...
B01 to B09 have the 0 after the B, any more items than this will leave the
0
out, so you will have B10, B11, etc. I have never heard of the 0 randomly
being
dropped from the variable names.

I do know that on older versions there is a possibility of non-consecutive
Bxx
sections, though, if the shopper removed an item from the cart. For
example,
Item 1, Item 2, and Item 3 are placed in the cart, shopper later removes
Item 2
and then finishes the order. In those older versions, this would leave you
with
B01 and B03 sections in the Order API output. This should be easy enough
to test
for in your Bxx loop, just do a test on one of the variables that should
always
have something in it like Bxx-Name, if it is null then you know there is
no Bxx
section with that number, so you can increment your counter and continue
on with
the next section.

I believe this was fixed in v6 so that there would always be consecutive
Bxx
sections, to help make looping easier.

-Loren




PROLOG Newsgroups wrote:

Hi,

I'm new to Shopsite, but have been asked by a client to look into a
possible
problem with a custom script that is being executed through the Order
API.
It is used to send a fax with the order information. The problem occurs
very
randomly, so it's been difficult to track down what is happening.

Based on the API specifications, in the Basket Information section, the
individual ordered items are identified by a prefix of B01-Bxx. This cus
tom
script accurately pulls all the order information, using the field names
as
specified in the Order API specs, with the exception of the individual
order
items. Most of the time, that is correct, too, but randomly it "drops"
some
of the items, as though it can't locate the parameters based on B01-Bxx
prefixes. The email that is sent by the order system, and the order db
shows
ALL the items were ordered, but they are not appearing on this fax. And
again, only very randomly does this happen.

The last time was 2 days ago - the client placed a duplicate "test"
order
immediately afterwards, with the exact same items that the customer had
ordered - and the fax was generated accurately.

I'm wondering if it's possible that under certain conditions, the Basket
Information MIGHT be generated without the leading zero on the parameter
field name prefixes (i.e., B5 instead of B05)? This is the only thing I
can
come up with to explain what is happening, but can't duplicate it "on
demand" so I can't prove it. I was just wondering if anyone else has
experienced this or anything similar within their Order API scripts.

Also - is there any file that could be viewed (log or db) that would
show
the B-value names that were generated during the order process? Or are
those
removed once the order is completed.

Sorry for being so verbose, and also if my terminology isn't
"SS-friendly".
I am a cgi programmer, but have no experience with ShopSite per-say.

Thank you,
Sharon
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 51 guests