Working with a client on a site using Store and having some shipping issues. They sell books and ship them all over the world.
Default shipping is set to: Shipping Address same as Billing We require all folks to have an account in order to buy. We have all countries enabled in the Store settings. USPS is installed as our shipping method with just one option - Priority. They have an active API.
Shipping error we're receiving: Please enter a valid ZIP Code for the recipient.
This happens when a customer in a country other than the US tries to check out. For instance, Taiwan has a region with a zip of 403.
I am passing the shipping method on this page as a hidden field.
Am I missing something here? Why would the API reject a zip code unless its US only? Assuming that the API is the issue and not my settings. Any help here would be greatly appreciated!!!
Thanks, Danielle
Cart/Checkout Page 1
<div id="cart-contents">
{exp:store:checkout error_handling="inline" error_delimiters='<span class="help-inline">|</span>' next="bookstore/checkout-test"}
{if no_items}
<hr>
<h2 style="text-align:center">Your cart is empty!</h2>
<hr>
<h4 style="text-align:center">Browse a Category to Get Started</h4>
{embed="bookstore/.cart-categories"}
{/if}
<input type="hidden" name="shipping_method" value="3" />
{error:shipping_method}
<table class="cart">
<thead>
<tr>
<th style="width:70%">Product</th>
<th style="width:10%;text-align:center">Price</th>
<th style="width:10%;text-align:center">Qty</th>
<th style="width:10%;text-align:center">Total</th>
</tr>
</thead>
<tbody>
{items}
<tr>
<td>
<p><strong><a href="{page_url}">{title}</a></strong></p>
<p><small>
<b>SKU:</b> {sku}<br />
{modifiers}
<b>{modifier_name}</b>: {modifier_value} {if price_mod_val}({price_mod}){/if}<br />
{/modifiers}
</small></p>
</td>
<td style="width:10%;text-align:center"><p>{price}</p></td>
<td style="width:10%;text-align:center"><input name="items[{key}][item_qty]" value="{item_qty}" class="qty" /></td>
<td style="width:10%;text-align:center"><p>{item_subtotal}</p></td>
</tr>
{/items}
</tbody>
</table>
<div class="totals">
<h3 style="margin:10px 0; padding:0">Your Order Subtotal: {order_subtotal}</h3>
{if promo_code}<h4>Discount: -{order_discount}</h4>{/if}
<p class="small">All shippable products delivered via USPS.<br />Shipping cost provided during checkout.</p>
</div>
<div class="promo">
<h4>Have a coupon or promo code?</h4>
<p><input type="text" name="promo_code" value="{promo_code}" class="input" /> <input type="submit" name="update_cart" value="Apply" class="btn apply" /></p>
{if promo_code}
<div class="clearing"> </div>
<p>Discount {promo_code} has been applied to your order.<br />
Click here to remove this discount: <input type="submit" name="remove_promo_code" value="X" class="remove" /></p>
{/if}
</div>
<div class="clearing"> </div>
<hr class="ten"><br />
<div class="form-actions">
<input type="submit" name="update_cart" value="Update Totals" class="btn" />
<input type="submit" name="empty_cart" value="Empty Cart" class="btn btn-danger" />
{if logged_in}<input type="submit" name="next" value="Continue to Checkout" class="btn btn-primary" />
{if:else}<a href="{path=bookstore/login}" class="btn btn-primary">Continue to Checkout</a>{/if}
</div>
{/exp:store:checkout}
Checkout Page 2
<div id="cart-contents" class="clearfix">
{exp:store:checkout
form_class="form-horizontal"
next="bookstore/checkout-review-test"
error_handling="inline"
error_delimiters='<span class="help-inline">|</span>'
require="name|address1|address3|country"
}
{if no_items}
{redirect="bookstore/cart"}
{/if}
<div class="column">
<fieldset id="billing_details">
<h3>Billing Details</h3>
<p>Please provide your billing info below.</p>
<div class="control-group {if error:billing_name}error{/if}">
<label class="control-label" for="billing_name">Name</label>
<div class="controls">
{field:billing_name} {error:billing_name}
</div>
</div>
<div class="control-group {if error:billing_address1}error{/if}">
<label class="control-label" for="billing_address1">Address</label>
<div class="controls">
{field:billing_address1} {error:billing_address1}
</div>
</div>
<div class="control-group {if error:billing_address2}error{/if}">
<div class="controls">
{field:billing_address2} {error:billing_address2}
</div>
</div>
<div class="control-group {if error:billing_address3}error{/if}">
<label class="control-label" for="billing_address3">City</label>
<div class="controls">
{field:billing_address3} {error:billing_address3}
</div>
</div>
<div class="control-group {if error:billing_region}error{/if}">
<label class="control-label" for="billing_region">State/Providence/Region</label>
<div class="controls">
<input id="billing_region" name="billing_region" type="text" />
{error:billing_region}
</div>
</div>
<div class="control-group {if error:billing_postcode}error{/if}">
<label class="control-label" for="billing_postcode">Zip Code</label>
<div class="controls">
{field:billing_postcode} {error:billing_postcode}
</div>
</div>
<div class="control-group {if error:billing_country}error{/if}">
<label class="control-label" for="billing_country">Country</label>
<div class="controls">
{field:billing_country} {error:billing_country}
</div>
</div>
</fieldset>
</div>
<div class="column">
<fieldset>
<h3>Shipping Details</h3>
<div class="control-group">
<div class="controls">
<p><label for="shipping_same_as_billing" class="checkbox">
{field:shipping_same_as_billing} Same as Billing Details (uncheck to update)
</label></p>
</div>
</div>
<div id="shipping_details_drawer">
<div class="control-group {if error:shipping_name}error{/if}">
<label class="control-label" for="shipping_name">Name</label>
<div class="controls">
{field:shipping_name} {error:shipping_name}
</div>
</div>
<div class="control-group {if error:shipping_address1}error{/if}">
<label class="control-label" for="shipping_address1">Address</label>
<div class="controls">
{field:shipping_address1} {error:shipping_address1}
</div>
</div>
<div class="control-group {if error:shipping_address2}error{/if}">
<div class="controls">
{field:shipping_address2} {error:shipping_address2}
</div>
</div>
<div class="control-group {if error:shipping_address3}error{/if}">
<label class="control-label" for="shipping_address3">City</label>
<div class="controls">
{field:shipping_address3} {error:shipping_address3}
</div>
</div>
<div class="control-group {if error:shipping_region}error{/if}">
<label class="control-label" for="shipping_region">State/Providence/Region</label>
<div class="controls">
<input id="shipping_region" name="shipping_region" type="text" />
{error:shipping_region}
</div>
</div>
<div class="control-group {if error:shipping_postcode}error{/if}">
<label class="control-label" for="shipping_postcode">Zip Code</label>
<div class="controls">
{field:shipping_postcode} {error:shipping_postcode}
</div>
</div>
<div class="control-group {if error:shipping_country}error{/if}">
<label class="control-label" for="shipping_country">Country</label>
<div class="controls">
{field:shipping_country} {error:shipping_country}
</div>
</div>
</div>
</fieldset>
</div>
<div class="clearing"> </div>
<div class="form-actions clearfix">
<a href="{path='bookstore/cart-test'}" class="btn" style="float:left">Edit Your Cart</a>
<input type="submit" name="next" value="Review Order" class="btn btn-primary" />
</div>
{/exp:store:checkout}
</div>
Checkout Page 3 / Final
<div id="cart-contents" class="checkout">
{exp:store:checkout
form_class="form-horizontal"
return="bookstore/order/ORDER_HASH"
error_handling="inline"
error_delimiters='<span class="help-inline">|</span>'
form_id="checkout-review"
payment_method="stripe"
}
{if no_items}
{redirect="bookstore/cart"}
{/if}
<div class="stripeErrors" style="padding:10px; background:#FDFFE0; margin:0 0 20px; text-align:center; display:none">
<h4>Payment Error:</h4>
</div>
{if error:payment_method}
<div style="padding:10px; background:#FDFFE0; margin:0 0 20px; text-align:center">
<h4>Order Error:</h4>
<div class="alert alert-error">{error:payment_method}</div>
</div>
{/if}
{if error:shipping_method}
<div style="padding:10px; background:#FDFFE0; margin:0 0 20px; text-align:center">
<h4>Order Error:</h4>
<div class="alert alert-error">{error:shipping_method}</div>
</div>
{/if}
<!-- Address Info -->
<div class="checkOne">
<h3>Billing Details</h3>
<div class="control-group">
<div><b>{billing_name}</b></div>
<div>{billing_address1}</div>
<div>{billing_address2}</div>
<div>{billing_address3}</div>
<div>{billing_region_name} {billing_postcode}</div>
<div>{billing_country_name}</div>
<!-- <div>{billing_phone}</div> -->
<div>{order_email}</div>
</div>
<p> </p>
<h3>Shipping Details</h3>
<div class="control-group">
{if shipping_same_as_billing}
Same as Billing Details
{if:else}
<div><b>{shipping_name}</b></div>
<div>{shipping_address1}</div>
<div>{shipping_address2}</div>
<div>{shipping_address3}</div>
<div>{shipping_region_name} {shipping_postcode}</div>
<div>{shipping_country_name}</div>
<!-- <div>{shipping_phone}</div> -->
{/if}
</div>
<p> </p>
<p><a href="{path='bookstore/checkout-test'}" class="btn" style="float:left">Edit Address Info</a></p>
</div>
<!-- Payment & Shipping Info -->
<div class="checkTwo">
<h3>Payments Accepted</h3>
<p><img src="/assets/images/img-creditcards.jpg" alt="Credit Cards Accepted" /></p>
<input type="hidden" id="payment_token" name="payment[token]" value="" />
<div class="control-group">
<label class="control-label" for="payment_name">Name on the Card</label>
<div class="controls">
<input type="text" id="payment_name" value="" class="required" />
</div>
{if error:payment_name}<label class="error">Provide the name that appears on the card.</label>{/if}
</div>
<div class="control-group">
<label class="control-label" for="payment_card_no">Credit Card Number</label>
<div class="controls">
<input type="text" id="payment_card_no" value="" class="required" />
</div>
{if error:payment_card_no}<label class="error">Provide a valid card number.</label>{/if}
</div>
<div class="control-group">
<label class="control-label" for="payment_exp_month">Expiration Date</label>
<div class="controls">
<select id="payment_exp_month" style="width:100px;padding:0" class="required selects">
<option value="">Month</option>
{exp_month_options}
</select>
<select id="payment_exp_year" style="width:100px;padding:0" class="required selects">
<option value="">Year</option>
{exp_year_options}
</select>
</div>
{if error:payment_exp_month}<label class="error" style="display:inline">Choose a month.</label>{/if} {if error:payment_exp_year}<label class="error" style="display:inline">Choose a year.</label>{/if}
</div>
<div class="control-group">
<label class="control-label" for="payment_csc">Security Code</label>
<div class="controls">
<input type="text" id="payment_card_csc" value="" class="required" />
</div>
{if error:payment_csc}<label class="error">Provide a valid code.</label>{/if}
</div>
</div>
<!-- Cart Contents -->
<div class="checkThree">
<div class="cartReview">
<h3>Cart Contents</h3>
{items}
<hr class="ten">
<p><strong>{title}</strong></p>
<p><small><b>SKU:</b> {sku}<br />{modifiers}<b>{modifier_name}</b>: {modifier_value} {if price_mod_val}({price_mod}){/if}<br />{/modifiers}{item_qty} @ {price} = {item_subtotal}</small></p>
{/items}
</div>
<h4>Subtotal: {order_subtotal}</h4>
<h4>Order Tax: {order_subtotal_tax}</h4>
<h4>USPS Shipping: {order_shipping}</h4>
{if promo_code}<h4>Discount: -{order_discount}</h4>{/if}
<h3>Grand Total: {order_total}</h3>
</div>
<div class="clearing"> </div>
<p> </p>
<hr class="ten">
<div class="form-actions">
<input type="submit" name="submit" id="checkout_submit" value="Complete Order" class="btn btn-primary" />
</div>
<p> </p><p> </p>
{/exp:store:checkout}
</div>