Coder Social home page Coder Social logo

coupongenerator's Introduction

Name

CouponGenerator - Create and manage single-use coupons for Magento stores.

Usage

<?php

$client = new SoapClient('http://yourmagentohost/api/?wsdl', array("trace" => 1));
$session = $client->login('username', 'password');

// Set the <ParentCouponID> to your parent coupon's ID.
$pId = <ParentCouponID>;

// Make a SOAP call to the service, passing in options as an array.  Change the obvious values in between the <>
$id = $client->call($session, 'coupongenerator.clonerule', array($pId, '<NEWCOUPONNAME>', '<NEWCOUPONCODE>', '<EXPIREDATE>'));

// Retrieve your new coupon and print out the object that you are returned.  (This should just be a single array().)
$result = $client->call($session, 'coupongenerator.info', $id);
print_r($result);

// Close the session now that we are done.
$client->endSession($session);
?>

Description

The CouponGenerator is designed for creating single-use coupons for Magento stores. It allows coupons to be generated for a single customer. It uses all data from the parent coupon, so care must be taken while creating the parent coupons.

For the purpose of this document, 'coupon' is used interchangeably with 'sales rule' in the Magento world.

Store Setup Best Practices

Since the CouponGenerator uses already existing coupons from which to clone new single-use coupons, it is important that the parent coupon is set up properly.

Parent Setup

  • Name - The parent coupon name should use a meaningful prefix to set it apart from other coupons. The name of the coupon should be as descriptive as possible, while still being short enough to not mess with UIs (your custom UI and/or the magento admin UI). ** Example: _TEMPLATE:Fifty Percent Off Underwear
  • Description - The description field is very important for letting your users know what the coupon does. It is important to remember that the parent coupon's description field will be inherited directly by the new coupon. This field is currently not overridden by the cloning process.
  • Status - The parent coupon's status should be set to 'Inactive' so that the parent coupon cannot be used.
  • Public in RSS Feed - This should be set to 'No' so that the parent coupon is not publicly visible.
  • Uses per coupon - Set this to how many cloned coupons you would like to allow. The cloning process will decrement this number, and then not allow any more coupons to be cloned when it reaches zero. You can always add more coupons to the parent if you would like to allocate more.
  • To Date - If you would like all cloned To Dates to be inherited from the parent, set this date and do not pass it as part of your SOAP call.

Caveats

  • The cloned coupon code must be unique.
  • The new coupon name does not need to be unique, but it should be something that does not clutter the store and can be sorted out of the list of results. A good example format is __ONEUSE:Coupon Name. This will cause the cloned coupons to be listed at the very end of the coupon list when sorted by name.

Packaging

Packaging this application for distribution is relatively simple: cd CouponGenerator tar cvzf app js CouponGenerator-<version_number>.tgz

Installation

Copy the CouponGenerator-<version_number>.tgz to the customer's Magento installation root and extract. Simple as that!

coupongenerator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coupongenerator's Issues

Template Rule * is empty

Hi there,
I've just installed this extension on Magento 1.5.10 but when I try to create a new coupon, the Template Rule field is an empty drop down, so I can't select anything and it won't let me proceed.
Any ideas what maybe happening?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.