Link to home
Start Free TrialLog in
Avatar of akiles99
akiles99Flag for India

asked on

XML error in script

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

Avatar of Tony McCreath
Tony McCreath
Flag of Australia image

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.
Avatar of akiles99

ASKER

Please go head and help me:)
ASKER CERTIFIED SOLUTION
Avatar of Tony McCreath
Tony McCreath
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks...