# An influencer code that still works during a sitewide sale

If your sitewide sale is 20% off and a creator's code is 10% off products, customers who enter the code during the sale get nothing extra. Shopify gives each item only one product discount, the one that saves the most, so the 20% wins and the code looks broken. The fix is to make the creator's code an order discount instead. Shopify applies order discounts after product discounts, so the code's 10% comes off the already-reduced price.

With [OneCode: Stackable Discounts](https://apps.shopify.com/rm-combo-discounts), the same code can also give free shipping. A Shopify discount code holds one kind of discount, so an order discount plus free shipping would otherwise be two codes per creator.

Here is a $100 cart during a 20% automatic sale, with the code ANNA10:

- The sale takes 20% off the shirt, so the items cost $80.
- ANNA10 takes 10% off the $80, which is $8.
- The customer pays $72, and shipping is free.

![Checkout with ANNA10 during a sale: the $100 summer linen shirt is $80 with the Summer sale label, ANNA10 takes $8 off the $80 subtotal, Economy shipping is free, and the total is $72](/images/checkout-anna.png)

## Set it up

1. In OneCode, click **Create discount**, keep **Discount code**, and enter `ANNA10`.
2. Click **Add Discount Type**, set **Discount Type** to **Order Discount**, and enter `10` in **Percentage**. Use an order discount here, not a product discount.
3. Click **Add Discount Type**, set **Discount Type** to **Shipping Discount**, and keep **Free Shipping**.
4. In **Combinations**, keep **Product discounts** ticked so the code can be used with your sale. If the sale also gives free shipping, keep **Shipping discounts** ticked too. New OneCode discounts have all three boxes ticked already.
5. Click **Save discount**.
6. Open your sale discount: on Shopify's **Discounts** page if it is a Shopify discount, or in OneCode if it is a OneCode discount. In its combination settings, allow it to combine with **Order discounts** and **Shipping discounts**, then save.

![The Combinations options in OneCode: Allow this discount to combine with other discounts, with Product discounts, Order discounts and Shipping discounts all ticked](/images/combinations-edit.png)

Shopify only lets two discounts work together when both of them allow it. If ANNA10 allows the sale but the sale does not allow order discounts, the customer can't use them together.

If your sale already gives free shipping, the customer simply gets free shipping. Shopify applies one shipping discount per order when the discounts are separate.

## If your sale uses compare-at prices

Some stores run a sale by lowering prices and showing the old price as the compare-at price, with no discount involved. The order discount setup above still works. A product discount in the code also works in this case, because no other product discount is on the item. By default it comes off the sale price: 10% off a shirt reduced from $100 to $80 takes off $8.

If you use a product discount, **Add sale item rule** lets you choose how the code treats items on sale:

- **Discount the sale price (default)**: the code's percentage comes off the current sale price, as in the example above.
- **Discount from the compare-at price**: the item ends at the code's percentage off its original price, or keeps its sale price if that is already lower. With a 20% code, an item reduced from $100 to $85 ends at $80, and an item reduced to $70 stays at $70. This is for percentage discounts only.
- **Exclude sale items**: the code only discounts items at full price.

## One code per creator

You don't need a separate discount for each creator. Save ANNA10 as above, then use **Create Bulk Codes** on its edit page to import the other creators' codes, such as `JOE10` and `MIA10`. Every code gives the same offer, and the bulk codes page shows how many times each code has been used, so you can see which creator drove each sale. You can import up to 10,000 codes at a time. See [bulk discount codes](/guides/bulk-discount-codes.md).

## On Shopify Plus

Shopify Plus stores have another option: letting two product discounts stack on the same item. Give the creator's code a product discount, then in its **Combinations** card switch **Product discounts** to **Multiple per product** and use **Combine on same product with discounts tagged**, with tags on both discounts. See [OneCode on Shopify Plus](/for/shopify-plus.md). On every other plan, use the order discount setup above.

For the wider plan, including how creator codes fit around a sale, see [influencer campaigns](/campaigns/influencers.md).

OneCode costs $9.90 USD every 30 days after a 7-day free trial, billed by Shopify. Install it from the [Shopify App Store](https://apps.shopify.com/rm-combo-discounts).
