# Behavior

Source: https://salesdrawer.com/docs/behavior/

> Auto-open rules and frequency, coupons with tap-to-copy, add to cart from the drawer, and the [sale_drawer_tab] shortcode.

Sale Drawer is designed to be noticed without being annoying. These are the settings that control when and how it interacts with shoppers.

## Auto-open rules and frequency

By default the drawer opens automatically **once per browsing session**, a few seconds after the page loads, and never on cart, checkout or account pages. You can change the delay, open after a scroll depth instead, limit auto-open to specific page types, or turn auto-open off so the drawer only opens from the launcher.

Closing the drawer always wins: once a shopper dismisses it, it stays closed for the rest of their session. This state lives in the shopper’s own browser storage — nothing is stored on your server.

## Coupons: tap-to-copy and validation

Show a coupon code at the top of the drawer. Shoppers tap it to copy. Before the code is displayed, Sale Drawer checks it with WooCommerce, so an expired, used-up or deleted coupon is hidden automatically instead of frustrating shoppers at checkout.

## Add to cart, Choose Options, cart awareness

- Simple products get an **Add to cart** button that works right inside the drawer, without a page reload.
- Products that need a choice first (variable products, products with add-ons) show **Choose options** and link to the product page.
- **Cart awareness:** items already in the cart are marked as added, so shoppers don’t add them twice.

## The [sale_drawer_tab] shortcode

Place `[sale_drawer_tab]` in any post, page, widget or builder text block to add an inline button that opens the drawer — for example inside a hero banner (“See this week’s deals”). Like the launcher, it hides itself automatically when nothing is on sale.
