LemonStand
Shipwire & LemonStand Overview

LemonStand now connects with Shipwire.
Key features include:
- Sell physical products, electronic goods and subscriptions
- Flexible CMS for managing pages and layouts
- Notification of orders from LemonStand to Shipwire
- Inventory Management
- Discount Tools
- Real-time inventory from your Shipwire locations to your LemonStand account.
To see a full list of features, visit LemonStand.com
How To Configure LemonStand for Shipwire
Follow these steps to configure the LemonStand sell tool:
-
Bind the purchased module to your LemonStand license and update LemonStand in order to install the module -
Configure the Delivery Times Estimator tooluse the following code to allow LemonStand and Shipwire to share Delivery Time Estimations:
- Delivery Estimations: If you want to add the estimated delivery time to the shipping method check out step, here is the code to add to a partial, name the partial something like shop:shipping_method_est:
if(!$sub_option->is_free && $sub_option->min_days): ?> $days = $sub_option->max_days > 1 ? ' Days' : ' Day'; ?> - Estimated Delivery Time: if($sub_option->min_days < 2 && $sub_option->max_days < 2): ?> Next Day elseif($sub_option->min_days === $sub_option->max_days ): ?> = $sub_option->max_days; ?>= $days ?> else: ?> =$sub_option->min_days ?> - = $sub_option->max_days; ?>= $days ?> endif; ?> endif; ?>
- Add the partial to the shipping_method step i.e
= $this->render_partial('shop:shipping_method_est'); ?>
-
Configure the Custom Tracking Number
- Customer Tracking Number : To send the customer an email with the tracking code: First add an email template this must be called shop:dispatched
Add what you would like to say in the email template. and press save, now manage compound variables and add a new variable.
Name your compound variable i.e shipping_tracking_code and copy and paste this code in:
$shipping_method = Shop_ShippingOption::create()->find_by_class_name("Shipwire_Shipping"); if($order->shipping_method_id == $shipping_method->id) { $tracking_code = array(); $order_tracking = Shop_OrderTrackingCode::find_by_order($order); foreach($order_tracking as $tracking) $tracking_code[] = $tracking->code; } ?> $include_tax = Shop_CheckoutData::display_prices_incl_tax($order); ?> $last_index = $items->count-1; foreach ($items as $index=>$item): ?>Item SKU Price Discount Quantity Total if($order->shipping_method_id == $shipping_method->id): ?>Shipped Tracking Code endif; ?> if (($item->bundle_master_order_item_id && $index == $last_index) || ($item->bundle_master_order_item_id && !$items[$index+1]->bundle_master_order_item_id)): $master_item = $item->get_master_bundle_order_item(); if ($master_item): ?>bundle_master_order_item_id): ?>style="padding-left: 30px" endif ?>> = $item->output_product_name() ?>= $item->product_sku ? h($item->product_sku) : h(' ') ?> = $include_tax ? format_currency($item->price_tax_included) : format_currency($item->single_price) ?> = $include_tax ? format_currency($item->discount_tax_included) : format_currency($item->discount) ?> = h($item->get_bundle_item_quantity()) ?> $master_item = $item->get_master_bundle_order_item(); $multiplier = ($master_item && $master_item->quantity > 1) ? ' x '.$master_item->quantity : null; ?> = $include_tax ? format_currency($item->bundle_item_total_tax_incl).$multiplier : format_currency($item-> bundle_item_total).$multiplier ?> = (isset($tracking_code[$index])) ? "Yes" : "No" ?> = (isset($tracking_code[$index])) ? $tracking_code[$index] : "N/A" ?> endif; ?> endif; ?> endforeach; ?>= h($master_item->product->name) ?> bundle totals = format_currency($master_item->get_bundle_single_price()) ?> = format_currency($master_item->get_bundle_discount()) ?> = $master_item->quantity ?> = format_currency($master_item->get_bundle_total_price()) ?> = (isset($tracking_code[$index])) ? "Yes" : "No" ?> = (isset($tracking_code[$index])) ? $tracking_code[$index] : "N/A" ?> Press save and add the new compound variable to the shop:dispatched email template as such {shipping_tracking_code} then save the shop:dispatched email template.
In order for the shop:dispatched email to be sent out, go to Settings / Order Route add a new order status (name it what you like). Go to the Notification tab, tick Notify Customer, from the drop down selected shop:dispatched, once done configuring press save.
Finally go to Shop / Shipping Options click on the your installed Shipwire Module or Install and configure, under the Order Route tab from the drop down select your newly created Order Route.
Your Shipwire Module has now been configured.