Magento Coupon code with 100% free in entire whole cart

Magento Coupon code with 100% free in entire whole cart

October 11, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento Coupon code with 100% free in entire whole cart

Creating a Magento Coupon Code for Entire Cart with 100% Discount

Introduction

Creating a coupon code in Magento that offers a 100% discount on an entire cart can be quite useful for promotional campaigns or special sales events. This guide will walk you through the process of creating such a coupon both from the admin interface and programmatically.

Creating a Coupon Code via Admin Interface

Step 1: Navigate to Promotions

  • Log into your Magento admin panel.
  • Click on “Marketing” in the left-hand menu, then select “Promotions.”
  • In the submenu that appears, click on “Shopping Cart Price Rules.”

Step 2: Create a New Rule

  • On the “Shopping Cart Price Rules” page, click on the “Add New Rule” button.

Step 3: Configure the Coupon Details

  • Give your rule a name and a description. These fields are for internal reference only.
  • In the “Coupon Code” field, enter the code you want customers to use for the discount. This is the code that will be applied at checkout.
  • Set the “Discount Amount” field to 100%. You can do this either by entering ‘100’ in the text box or selecting ‘Percent’ from the dropdown and leaving the text box empty.

Step 4: Configure the Rule

  • In the “Rule Information” section, you can set conditions for when this rule applies. For a general 100% discount, leave these fields blank.
  • Scroll down to the “Actions” section. Here, ensure that the “Apply the rule” option is set to ‘Percent of total’. The value should be 100%.

Step 5: Save and Apply

  • Click on “Save Rule.” You will see a warning about losing data if you haven’t saved yet; click “OK.”
  • Finally, go back to the list view of your shopping cart price rules. Find the rule you just created and click on the green arrow icon in the “Apply” column.

Creating a Coupon Code via API

Creating coupon codes programmatically requires interacting with Magento’s SOAP API or REST API. Here we’ll focus on using the SOAP API for simplicity.

Step 1: Prepare Your Environment

  • You need to have access to your Magento server and know the URL of your Magento installation.
  • Ensure you have a SOAP client like phpSoapClient ready in your development environment.

Step 2: Create a New Coupon Code

Here is an example PHP script that creates a new coupon code using the SOAP API:

<?php
$client = new SoapClient('http://your_magento_url/index.php/api/soap/?wsdl');

// Authenticate with Magento admin credentials
$sessionId = $client->login('username', 'password');

// Create a new shopping cart price rule
$ruleData = array(
    'rule' => array(
        'name' => 'Full Cart Discount',
        'description' => '100% discount on entire cart',
        'coupon_code' => 'FULLDISCOUNT'
    ),
    'rule_condition' => array(),
    'rule_actions' => array(
        0 => array('action_condition' => '', 'action_amount' => 100, 'action_apply_to' => '%')
    )
);
$response = $client->call($sessionId, 'admin.v2.quoteRule.create', array('rules' => array($ruleData)));

Replace 'http://your_magento_url/index.php/api/soap/?wsdl' with the actual URL of your Magento installation.

Step 3: Activate the Coupon

  • To make the coupon available for customers, you need to activate it manually through the admin interface or use an additional API call not included in this example.

Conclusion

Creating a Magento coupon code that offers a 100% discount on the entire cart can be achieved both via the admin panel and programmatically using the SOAP API. Remember to test your coupon thoroughly before deploying it to ensure it works as expected across different scenarios.

At Laravel Company, we specialize in providing comprehensive Magento solutions, including custom coupon code development tailored to your specific business needs. Contact us today to discuss how we can help you manage your online store’s promotional strategies more effectively.

Checkout Admin Configuration Customers

Our network