Get my shipping set up in 24h.

Shipping illustration Learn more

Shipping Configuration for an Online Pet Supply Store: Pet Food, Toys, and Accessories​

Pet supply store
Author Grzegorz Rola
Updated:
2025-03-04
Reading time:
5 minutes read

Shipping Scenario Provided by the Store Owner

Shipping Classes: Pet Food, Toys, Accessories
Base Shipping Fee: $6.95 per order
Weight & Volume Integration:
– If the items belong to the Pet Food shipping class, add $4 per 1 kg.
– If the items belong to the Accessories shipping class, add $2 per 1 item.
– If the items belong to the Toys shipping class, add $1 per 1 item.
Additional Conditions:
– Bundle Discount: If the order includes 5 or more items (from any shipping class), subtract $5 from the total shipping fee.
– Insurance: Automatically apply a 5% insurance fee for orders valued over $100.
– Special Handling: Each product that has a perishable tag adds a $2 handling fee; each product that has a fragile product tag adds an additional $2 packaging fee.
– Free Shipping Conditions: Orders valued at $300 or more qualify for free standard shipping.

Scenario Analysis

The store owner charges a base shipping fee of $6.95 for every order. Then, depending on the shipping class of the items, we add extra charges:

  • $4 per kilogram if the shipping class is Pet Food (this cost scales with the Pet Food items’ total weight).
  • $2 per item if the shipping class is Accessories.
  • $1 per item if the shipping class is Toys.

If the order has 5 or more items in total, a $5 discount (negative cost) is applied to encourage bigger purchases.

In addition, each product marked with the perishable tag adds $2 per item, and each product marked with the fragile tag also adds $2 per item.

If the order value exceeds $100, a 5% insurance fee (based on the order value) is charged.

Finally, if the total order value reaches $300 or more, shipping is free, overriding all other shipping charges (in this configuration, that also means we do not apply other shipping fees).

Below, you will find edge cases:

  • Order valued at $310 with 2 items: Qualifies for free shipping immediately. No shipping fee, no bundle discount, and no additional per-weight or per-item costs are assessed, since the free shipping rule halts further processing in our example configuration.
  • Order valued at $99 with 3 Pet Food items weighing 2 kg total: Does not qualify for free shipping or insurance. The shipping cost starts at $6.95, plus $4/kg for Pet Food (2 kg = $8). Total shipping is $14.95. There are only 3 items, so no $5 discount. No insurance applies because the value is under $100.
  • Order valued at $120 with 6 items: No free shipping, but insurance applies (5% of $120 = $6). Base shipping is $6.95, then add relevant shipping-class fees, minus $5 if there are 5 or more total items, plus any perishable or fragile fees if applicable. Finally, add 5% for insurance because the total order value is over $100.

Rule Order Explanation

The configuration starts by checking if the order value is $300 or more. If it is, we set shipping cost to $0 and stop further rule processing (so shipping remains free). If that initial free-shipping rule does not apply, we then proceed with:

  1. A base shipping fee of $6.95 (always applied when not free).
  2. Shipping-class-based fees: Pet Food ($4/kg), Accessories ($2/item), Toys ($1/item).
  3. A bundle discount of $5 off if the entire order has 5 or more items.
  4. Special handling for products tagged perishable (+$2 per such item) and fragile (+$2 per such item).
  5. Finally, a 5% insurance fee when the order value is above $100.

If all of these rules are processed, they are added up cumulatively to form the final shipping cost. However, if any single rule includes a “special_action”: “stop,” no subsequent rules are evaluated for the shipping cost.

JSON Configuration for Flexible Shipping PRO

Below is a JSON configuration that follows the provided schema and applies the described shipping scenario. Please note it must strictly adhere to the rules-table-schema.json, and we must implement each condition as a separate rule. Each rule either adds or subtracts from the shipping cost depending on whether the condition is met. You can import this directly into the plugin.


{
  "rules_table": {
    "rules": [
      {
        "conditions": [
          {
            "condition_id": "value",
            "operator": "is",
            "min": "300",
            "max": ""
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [],
        "special_action": "stop"
      },
      {
        "conditions": [
          {
            "condition_id": "none"
          }
        ],
        "cost_per_order": "6.95",
        "additional_costs": [],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "shipping_class",
            "operator": "any",
            "shipping_class": [
              "Pet Food"
            ]
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [
          {
            "additional_cost": "4",
            "per_value": "1",
            "based_on": "weight"
          }
        ],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "shipping_class",
            "operator": "any",
            "shipping_class": [
              "Accessories"
            ]
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [
          {
            "additional_cost": "2",
            "per_value": "1",
            "based_on": "item"
          }
        ],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "shipping_class",
            "operator": "any",
            "shipping_class": [
              "Toys"
            ]
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [
          {
            "additional_cost": "1",
            "per_value": "1",
            "based_on": "item"
          }
        ],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "item",
            "operator": "is",
            "min": "5",
            "max": ""
          }
        ],
        "cost_per_order": "-5",
        "additional_costs": [],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "product_tag",
            "operator": "any",
            "product_tag": [
              "perishable"
            ]
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [
          {
            "additional_cost": "2",
            "per_value": "1",
            "based_on": "item"
          }
        ],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "product_tag",
            "operator": "any",
            "product_tag": [
              "fragile"
            ]
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [
          {
            "additional_cost": "2",
            "per_value": "1",
            "based_on": "item"
          }
        ],
        "special_action": "none"
      },
      {
        "conditions": [
          {
            "condition_id": "value",
            "operator": "is",
            "min": "100.01",
            "max": ""
          }
        ],
        "cost_per_order": "0",
        "additional_costs": [
          {
            "additional_cost": "0.05",
            "per_value": "1",
            "based_on": "value"
          }
        ],
        "special_action": "none"
      }
    ]
  }
}

To use this configuration, copy the above JSON and paste it into the Flexible Shipping PRO plugin’s rule table (click the “Paste” button within the plugin interface).

Shipping Configuration for an Online Pet Supply Store: Pet Food, Toys, and Accessories​

Verifying Edge Cases Against the Rules

Let’s analyze how some example orders behave with the final rules:

  1. Order Value $310, 2 items total:
    – Rule 1 checks if the order value is at least $300. That’s true, so cost_per_order = 0 and special_action = stop. We stop processing further rules. The final shipping cost is $0, fulfilling “free shipping.”
  2. Order Value $99, 3 items, all Pet Food weighing total 2 kg:
    – Rule 1 (free shipping) is not met, value is under $300.
    – Rule 2 adds a base shipping cost of $6.95.
    – Rule 3 (Pet Food shipping class) applies $4/kg: 2 kg × $4 = $8. Now total shipping is $14.95.
    – Remaining rules do not match or have no effect (item count is only 3, so no -$5 bundle discount, and no 5% insurance since $99 ≤ 100). Final shipping cost is $14.95.
  3. Order Value $120, 6 items:
    – Rule 1 is not triggered since $120 < $300.
    – Rule 2 adds $6.95 base shipping.
    – Then the shipping-class rules apply, depending on how many items are in Pet Food, Accessories, or Toys. Suppose there are 2 Pet Food items (total 1 kg) and 4 Accessories items. That yields $4 from the Pet Food weight (1 kg × $4) plus $8 from Accessories (4 items × $2 each) = $12. Adding that to $6.95 yields $18.95 so far.
    – Rule 6 checks item count ≥ 5. Yes, 6 items, so that subtracts $5. The total is $13.95.
    – Suppose no items are perishable or fragile, so no extra $2 fees per item from rules 7 or 8.
    – Finally, rule 9 sees the order value is $120 > $100. So we add 5% of $120 = $6. The shipping total becomes $19.95.

Challenges in the Pet Products Shipping Sector

When shipping pet-related products, store owners often face a few common challenges:

  • Weight-Based Costs: Pet Food can be heavy, leading to high shipping fees. Balancing affordability and profitability can be tricky.
  • Fragile & Perishable Handling: Items that break easily (e.g., electronic pet feeders or glass bowls) or spoil quickly (perishable foods) require special packaging and faster shipping methods, adding complexity to the cost structure.
  • Bulk Orders: Some customers buy in large volumes for multiple pets, requiring store owners to design discounts (e.g., a bundle discount) but still maintain shipping cost coverage.
  • Insurance Above Certain Values: High-value orders benefit from insurance coverage. Deciding whether it’s optional or mandatory, or if it’s still charged when shipping is otherwise free, can lead to policy complexities.

All these considerations must be weighed when implementing a shipping cost table. The above configuration, though complex, demonstrates how to handle multiple real-world conditions in a single, cumulative system.