Solved

XML error in script

Posted on 2008-10-01
4
266 Views
Last Modified: 2012-06-27
Hi,

I got this error in my xcart website.

Error:

Error parsing XML; message from parser is: Invalid value for body of quantity in checkout-shopping-cart/shopping-cart/items/item: Must be at least 1

Warnings: XML failed to validate against the schema at line: 8, column: 8, with error: cvc-datatype-valid.1.2.1: '' is not a valid value for 'decimal'.
XML failed to validate against the schema at line: 8, column: 8, with error: cvc-complex-type.2.2: Element 'unit-price' must have no element [children], and the value must be valid.
XML failed to validate against the schema at line: 9, column: 9, with error: cvc-minInclusive-valid: Value '0' is not facet-valid with respect to minInclusive '1' for type '#AnonType_quantityItem'.
XML failed to validate against the schema at line: 9, column: 9, with error: cvc-type.3.1.3: The value '0' of element 'quantity' is not valid.
<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">
  <shopping-cart>
    <items>
      <item>
        <item-name>Postcards</item-name>
        <item-description>Standard (5.47&amp;quot; x 4.21&amp;quot;), Double-Sided, Full Color - Price Breakdown (Excluding Envelopes)</item-description>
        <unit-price currency="USD"></unit-price>
        <quantity>0</quantity>
        <merchant-item-id>620</merchant-item-id>
      </item>
    </items>
  </shopping-cart>
  <checkout-flow-support>
    <merchant-checkout-flow-support>
      <edit-cart-url>http://www.savethedatemagic.com?sol=cart</edit-cart-url>
      <continue-shopping-url>http://www.savethedatemagic.com</continue-shopping-url>
      <shipping-methods>
        <flat-rate-shipping name="Rush ('3 Business Days')">
          <price currency="USD">29.99</price>
          <shipping-restrictions>
            <allow-us-po-box>true</allow-us-po-box>
            <allowed-areas>
              <us-country-area country-area="CONTINENTAL_48" />
            </allowed-areas>
          </shipping-restrictions>
        </flat-rate-shipping>
        <flat-rate-shipping name="Priority ('7 Days')">
          <price currency="USD">12.99</price>
          <shipping-restrictions>
            <allow-us-po-box>true</allow-us-po-box>
            <allowed-areas>
              <us-country-area country-area="CONTINENTAL_48" />
            </allowed-areas>
          </shipping-restrictions>
        </flat-rate-shipping>
      </shipping-methods>
      <request-buyer-phone-number>false</request-buyer-phone-number>
      <tax-tables>
        <default-tax-table>
          <tax-rules>
            <default-tax-rule>
              <shipping-taxed>false</shipping-taxed>
              <rate>0.075</rate>
              <tax-area>
                <us-state-area>
                  <state>FL</state>
                </us-state-area>
              </tax-area>
            </default-tax-rule>
          </tax-rules>
        </default-tax-table>
      </tax-tables>
    </merchant-checkout-flow-support>
  </checkout-flow-support>
</checkout-shopping-cart>

Open in new window

0
Comment
Question by:akiles99
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Tiggerito
ID: 22622389
It look like you can't order 0 (zero) postcards. Which makes sense.

I'd look into why your system is attempting to do that.
0
 

Author Comment

by:akiles99
ID: 22622449
Please go head and help me:)
0
 
LVL 23

Accepted Solution

by:
Tiggerito earned 500 total points
ID: 22622502
I'm not familiar with xcart but it seems your website software is attempting to order a quantity of zero postcards, and on top of that, they have no price.

Did you make the order yourself? If so, did you enter a correct quantity and see a valid price?

If you didn't make the order could you try a test order. See if you can attempt to order zero postcards. Try a valid order and see if it works.

Do you administer the products and their prices? If so, chack to make sure the postcards have a valid price and all settings make sense.


0
 

Author Closing Comment

by:akiles99
ID: 31502253
Thanks...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xml xsd validation free tool to download 10 85
Changing Sitemap Frequency on XML File 3 68
Nessus Scan 1 71
what are list of ebay api errors 1 19
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question