Set custom issue, delivery and due dates

Sufio allows you to set custom issue date, delivery date, and due date on your invoices. You can do so by adding a unique cart attributes to your Shopify store. 

Issue date

By default, Sufio sets the issue date to the date when the order in your Shopify store was created. 

If you want to set the issue date to a custom date, you can do so by adding a cart attribute Invoice Issue Date to the cart page. The date should be in the format YYYY-MM-DD.

For example, this cart attribute sets invoice issue date to April 20, 2020: 

<input type="hidden" name="attributes[Invoice Issue Date]" id="invoice-issue-date" value="2020-04-20" />

To add the cart attribute to your cart page:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code
  3. Select cart.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Insert the code snippet displayed above before the </form> tag. 

Note

The code snippet may need to be added to a different file than cart.liquid, depending on the theme you use. Often, the file is named main-cart-footer.liquid.

If your store uses cart drawer (also called ajax cart), in most cases, the right file is ajax-cart-template.liquid file.

Delivery date

By default, the delivery date is not displayed on invoices. 

If you want to set the delivery date to a custom date, you can do so by adding a cart attribute Invoice Delivery Date to the cart page. The date should be in the format YYYY-MM-DD.

For example, this cart attribute sets invoice delivery date to March 30, 2020: 

<input type="hidden" name="attributes[Invoice Delivery Date]" id="invoice-delivery-date" value="2020-03-30" />

You can also set the delivery date to a custom number of days from the day an order has been created. 

In the example below, the delivery date is set to 7 days from the day an order has been created.

<!-- Shopify cart page -- set custom invoice delivery date to 7 days (604800 seconds) from order creation date. Used by Sufio for Shopify (sufio.com/shopify). -->
<input type="hidden" name="attributes[Invoice Delivery Date]" id="invoice-delivery-date" value="{{ 'now' | date: "%s" | plus: 604800 | date: "%Y-%m-%d" }}" />

To add the cart attribute to your cart page:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code.
  3. Select cart.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Insert the code snippet displayed above before the </form> tag.

Due date

You can set a default due date for newly created invoices in your Sufio account in the SettingsInvoice Settings page, by adding a number in the Due in … days field.

If you want to set the due date for some orders to a custom date, you can do so by adding a cart attribute Invoice Due Date to the cart page. The date should be in the format YYYY-MM-DD.

For example, this cart attribute sets invoice due date to November 13, 2020: 

<input type="hidden" name="attributes[Invoice Due Date]" id="invoice-due-date" value="2020-11-13" />

You can also set the due date to a custom number of days from the day an order has been created.

In the example below, the due date for customers tagged in Shopify as VIP is set to 30 days from the day an order has been created.

<!-- Shopify cart page -- set custom invoice due date to 30 days (2592000 seconds) from order creation date for certain customers. Used by Sufio for Shopify (sufio.com/shopify). -->
{% if customer.tags contains 'VIP' %}
  <input type="hidden" name="attributes[Invoice Due Date]" id="invoice-due-date" value="{{ 'now' | date: "%s" | plus:2592000| date: "%Y-%m-%d" }}" />
{% endif %}

To add the cart attribute to your cart page:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code.
  3. Select cart.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Insert the code snippet displayed above before the </form> tag.

Need help?

Do you need help with customizing your Shopify store theme? Please contact our experienced support team. We'll be happy to assist!