1 of 2
1
Invalid SKU/Product Code
Posted: 08 March 2010 08:41 PM   Ignore ]  
Newbie
Rank
Total Posts:  16
Joined  2009-11-23

Howdy,

So when I get an order in FoxEE, and I look at it under the “orders” tab, pretty much 100% of the time it says “Invalid Sku Provided”. When I look in the Activity Log, it says “Invalid Product code”. (ie, “FoxyCart Datafeed Error (orderid: 1138295) Invalid product code sent: TEST). So either the SKU or the product code is wrong. Or maybe both?

This is a problem because it appears to be preventing FoxEE’s inventory tracking from working correctly. My add to cart code is below. Any ideas of what could be amiss?

Thanks,

Mark

{if foxee_has_inventory}
{exp
:foxee:addtocart id="{entry_id}" hide_fields="quantity" label="Register" dates="{start_date format="%%j"} - {end_date format="%%j"}" time="{day}, {time}"}
{
/if} 

results in a form that looks like:

<form id="foxycart_1575" method="post" action="https://mysite.foxycart.com/cart" class="foxycart ">
<
input type="hidden" name="block_fb" value="false" />
<
input type="hidden" name="shipping_phone" value=" " />
<
input type="hidden" name="x:sku" value="1575" />
<
input type="hidden" name="code" value="TEST" />
<
input type="hidden" name="weight" value="0.00" />
<
input type="hidden" name="name" value="Test Product" />
<
input type="hidden" name="price" value="0.00" />
<
input type="hidden" name="category" value="default" />
<
input type="hidden" name="dates" value="-" />
<
input type="hidden" name="time" value="" />
<
input type="hidden" name="h:quantity" value="1" />
<
input type="hidden" name="quantity_max" value="100" />
<
input type="submit" name="submit" value="Register" class="foxycart_link " />
</
form
Profile
 
Posted: 08 March 2010 08:54 PM   Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1463
Joined  2007-11-23

Hi Mark,

couple questions, what build of Foxee are you using? Make sure you upgrade to the latest (035)

Do you get the same errors if you use the foxee_test_template? Please install and test with the test template.

The inventory will not reduce if there are errors so that is functioning properly.

One other thing I saw that might cause a problem are the data and time parameters you have. I imagine you are trying to set hard sub dates.

Signature 

Mike

HCC Development

Profile
 
Posted: 09 March 2010 05:28 PM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  16
Joined  2009-11-23

I will upgrade to 035 today, I had been using 034. I do have the test template installed, and I get the same error if I hit “checkout” from there rather than from the FoxyBox. Although I am not sure how to add products from the test template, so if the error is happening when I add stuff to the cart I don’t think that would catch it.

PS - The date and time parameters are just there so they show up on the user’s receipt, I don’t actually do anything with them programmatically.

Profile
 
Posted: 09 March 2010 06:37 PM   Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1463
Joined  2007-11-23

It sounds like you didn’t set the weblog variable in the test template?? It should show all of the products in your weblog. Do you have a link?

Passing the date and time values in the cart is fine the way you have it.

hitting checkout will not change anything, you need to add the products to the cart properly to not receive errors.

Signature 

Mike

HCC Development

Profile
 
Posted: 09 March 2010 07:35 PM   Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  16
Joined  2009-11-23

OK I am upgraded to 035. The test template was not showing my products because they’re not physical, downloadable, subscription, or donation (I am selling class registrations). I removed the foxee_product_type=“download” in the test template and the products all show up now, so I can add them to the cart from there. Even after doing that, however, I still get the same error(s) in my activity feed and order history. I’ll PM URL and login details now, thanks for your help!

Profile
 
Posted: 11 March 2010 03:56 PM   Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  3
Joined  2010-03-04

We’re experiencing the same problem with our donations. We’re on version 1.10.60.035.

It appears that the sku is not getting passed back from foxycart in the data feed (I can provide same data that is being returned). I was able to correct the problem by removing sku from the $exc array in the _build_hidden_field_string method in mod.foxee.php file (approx. line 3074).

Aaric

Profile
 
Posted: 12 March 2010 06:56 PM   Ignore ]   [ # 6 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1463
Joined  2007-11-23

Hey Aaric, I know for a fact that this is not a bug in Foxee so you shouldn’t have to hack the files.

As to what is causing the sku errors I’m not sure, there maybe a database error from a upgrade. What build of Foxee did you guys upgrade from?

Signature 

Mike

HCC Development

Profile
 
Posted: 12 March 2010 08:37 PM   Ignore ]   [ # 7 ]  
Newbie
Rank
Total Posts:  16
Joined  2009-11-23

I upgraded most recently from 034. I believe the first version I installed was either 028 or 029, and then I’ve upgraded a couple times since then.

I do agree with Aaric it seems the SKU is not being passed back from FoxyCart. When I look at the POSTs going from my server to FC I see x:sku showing up in the requests like I suspect it’s supposed to. But then it’s not in the fc_json object at the top of my checkout page, and “sku” does not appear anywhere in the XML response FoxyCart sends. I assume it needs to be passed back from FC in order for FoxEE to interpret it?

Mark

Profile
 
Posted: 22 March 2010 04:12 PM   Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  16
Joined  2009-11-23

should I ask the FoxyCart guys about this? Any other ideas? Should I be seeing a “sku” field in the XML response from FoxyCart?

Profile
 
Posted: 22 March 2010 05:17 PM   Ignore ]   [ # 9 ]  
Newbie
Rank
Total Posts:  3
Joined  2010-03-04

Mike,

Sorry, things have been a little hectic around here. I’m sure that that is there for a reason. I just pointed that out as removing that fixed the problem for me and I thought it might help point you in the right direction. I’m attaching some test data feeds from foxycart with and without the change. As you can see, before I made the modification the sku was not included in the data sent from foxycart and after the modification it shows up.

Aaric

File Attachments 
before_modification.txt  (File Size: 5KB - Downloads: 18)
after_modification.txt  (File Size: 6KB - Downloads: 23)
Profile
 
Posted: 26 March 2010 03:59 PM   Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  8
Joined  2010-03-22

I’m on the most recent build, and I’m also having this problem.

Profile
 
Posted: 26 March 2010 04:48 PM   Ignore ]   [ # 11 ]  
Newbie
Rank
Total Posts:  8
Joined  2010-03-22

Just as an experiment, I did an entirely fresh install of FoxEE on a different server for a different domain for a site that has never had ecommerce.

After everything was setup and running, I submitted a test order, checked the datafeed and sure enough, the same error “Invalid Sku Provided”

This is what I used to add my product to the cart

{exp:foxee:addtocart id="{entry_id}"

Which when I view source, outputs this:

<form id="foxycart_33" method="post" action="https://mydomain.foxycart.com/cart" class="foxycart ">
<
input type="hidden" name="block_fb" value="false" />
<
input type="hidden" name="x:sku" value="33" />
<
input type="hidden" name="code" value="00001" />
<
input type="hidden" name="weight" value="0.00" />
<
input type="hidden" name="name" value="First Product" />
<
input type="hidden" name="price" value="5.00" />
<
input type="hidden" name="category" value="" />
<
input type="hidden" name="quantity_max" value="2" />
<
input name="quantity" type="text" size="3" value="1" />
<
input type="submit" name="submit" value="Add to Cart" class="foxycart_link " />
</
form

There is obviously some kind of bug somewhere unless we’re all just missing something.

It is crucial that this issue be solved by Sunday night at the latest, please help!!

Profile
 
Posted: 26 March 2010 04:57 PM   Ignore ]   [ # 12 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1463
Joined  2007-11-23

Jason, could you please provide a list of all of your settings:

Foxee general settings for FoxyCart
Your FoxyCart store settings

I have several installations of Foxee in our test environments and do not receive these errors.

Thanks

Signature 

Mike

HCC Development

Profile
 
Posted: 26 March 2010 05:56 PM   Ignore ]   [ # 13 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1463
Joined  2007-11-23

Hey guys, just an update. Jason’s issue was with the addtocart form that he constructed. We determined this by using the foxee test template to run test transactions, which returned without errors.

Please do the same for your installations (use the test template) to eliminate any third party conflicts or form template issues.

Signature 

Mike

HCC Development

Profile
 
Posted: 27 March 2010 11:35 AM   Ignore ]   [ # 14 ]  
Newbie
Rank
Total Posts:  8
Joined  2010-03-22

Hey Mike,

Thanks again for all your help.  It turns out the issue was foxycart’s fc_PreProcess() function, that validates the form before submission to the cart.

After I removed the function, everything worked perfectly.

Do you have any alternatives for me to use for making sure all required fields have been filled out?

Profile
 
Posted: 30 March 2010 04:27 PM   Ignore ]   [ # 15 ]  
Newbie
Rank
Total Posts:  16
Joined  2009-11-23
Admin - 26 March 2010 05:56 PM

Hey guys, just an update. Jason’s issue was with the addtocart form that he constructed. We determined this by using the foxee test template to run test transactions, which returned without errors.

Please do the same for your installations (use the test template) to eliminate any third party conflicts or form template issues.

I did this, see post #4 in this thread, and I still have the SKU error. Jason, if you don’t mind, what was the error that fc_preprocess was causing? How did you determine that was the cause?

Profile
 
   
1 of 2
1
 
‹‹ Foxee Headers      Foxee Quantity Pulldown ››

Join our Mailing List