How can I give first time customers a discount on their next order?Magento coupon codes - only one coupon / guest customerHow to create/store custom order attributeMagento Coupons limit per use o per customer not workingCan use of a coupon be shown in order information?How to get total discount amount of Coupon Code for all items in the cartMagento: How to get customer last order by joining customers and orders?Magento is discounting the entire shopping cart when I have it set to discount specific products. How can I fix this?Cancel discount on creditmemo when conditions do not match anymoreHow to give non-fixed discount for different fixed prices?Apply discount only if subtotal of products is greater than a certain amount

Was the 2019 Lion King film made through motion capture?

The cat ate your input again!

Visa National - No Exit Stamp From France on Return to the UK

Blocking people from taking pictures of me with smartphone

English - Acceptable use of parentheses in an author's name

In SQL Server, why does backward scan of clustered index cannot use parallelism?

Why are Gatwick's runways too close together?

How can you evade tax by getting employment income just in equity, then using this equity as collateral to take out loan?

The equation of motion for a scalar field in curved spacetime in terms of the covariant derivative

Are there any financial disadvantages to living significantly "below your means"?

Plausibility of Ice Eaters in the Arctic

Extremely casual way to make requests to very close friends

Packages "LibertinusT1Math" raises error if compiled with XeLaTeX

Does this Foo machine halt?

How are you supposed to know the strumming pattern for a song from the "chord sheet music"?

function evaluation - I don't get it

A tool to replace all words with antonyms

Confused about the answers to two logic problems

How does 'AND' distribute over 'OR' (Set Theory)?

Why do funding agencies like the NSF not publish accepted grants?

Te-form and かつ and も?

Help evaluating integral (anything simple that I am missing?)

What are the uses and limitations of Persuasion, Insight, and Deception against other PCs?

AsyncDictionary - Can you break thread safety?



How can I give first time customers a discount on their next order?


Magento coupon codes - only one coupon / guest customerHow to create/store custom order attributeMagento Coupons limit per use o per customer not workingCan use of a coupon be shown in order information?How to get total discount amount of Coupon Code for all items in the cartMagento: How to get customer last order by joining customers and orders?Magento is discounting the entire shopping cart when I have it set to discount specific products. How can I fix this?Cancel discount on creditmemo when conditions do not match anymoreHow to give non-fixed discount for different fixed prices?Apply discount only if subtotal of products is greater than a certain amount






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















The conditions would be:



1) customers only



2) One time use only



3) must have previous order



#1 and #2 are straight forward, but what is a good approach to only giving this to customers that have placed an order?










share|improve this question


























  • Which Magento version you are using? In EE you can use the concept of Customer Segmentation + Shopping Cart price rules.

    – MagePsycho
    May 26 '14 at 9:02

















2















The conditions would be:



1) customers only



2) One time use only



3) must have previous order



#1 and #2 are straight forward, but what is a good approach to only giving this to customers that have placed an order?










share|improve this question


























  • Which Magento version you are using? In EE you can use the concept of Customer Segmentation + Shopping Cart price rules.

    – MagePsycho
    May 26 '14 at 9:02













2












2








2


1






The conditions would be:



1) customers only



2) One time use only



3) must have previous order



#1 and #2 are straight forward, but what is a good approach to only giving this to customers that have placed an order?










share|improve this question
















The conditions would be:



1) customers only



2) One time use only



3) must have previous order



#1 and #2 are straight forward, but what is a good approach to only giving this to customers that have placed an order?







customer coupon discount






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 29 '14 at 15:50









David Manners

25k9 gold badges62 silver badges213 bronze badges




25k9 gold badges62 silver badges213 bronze badges










asked Apr 26 '14 at 7:33









kevandokevando

4241 gold badge9 silver badges22 bronze badges




4241 gold badge9 silver badges22 bronze badges















  • Which Magento version you are using? In EE you can use the concept of Customer Segmentation + Shopping Cart price rules.

    – MagePsycho
    May 26 '14 at 9:02

















  • Which Magento version you are using? In EE you can use the concept of Customer Segmentation + Shopping Cart price rules.

    – MagePsycho
    May 26 '14 at 9:02
















Which Magento version you are using? In EE you can use the concept of Customer Segmentation + Shopping Cart price rules.

– MagePsycho
May 26 '14 at 9:02





Which Magento version you are using? In EE you can use the concept of Customer Segmentation + Shopping Cart price rules.

– MagePsycho
May 26 '14 at 9:02










2 Answers
2






active

oldest

votes


















2














I would suggest to create a new discount type "cashback". This can be done using this observer "adminhtml_block_salesrule_actions_prepareform".



Once this option is added then you can apply the discount by overriding process function of Mage_SalesRule_Model_Validator



In the process function, you will find switch case as follows




switch ($rule->getSimpleAction())




where you can easily add your new discount type "cashback", in this case you can find out if the customer has placed order before or not, if yes then apply discount other don't apply discount.



The above will work if you are a developer otherwise search for cash back or next order discount on magento connect, there are modules available.



Like -: for M1 https://www.scommerce-mage.com/magento-next-order-discount.html



and M2 https://www.scommerce-mage.com/magento-2-next-order-discount.html



Hope the above helps!



Cheers
S






share|improve this answer


































    1














    First you need to get the count of the orders that the customer has made:



    $customer_id = some id; 
    $ordersCollection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',$customer_id);
    $orderCount = $ordersCollection->count();
    if($orderCount == 1)
    $order = $ordersCollection->getFirstItem();
    //Check order status (closed, complete etc)
    if($order->getStatusLabel() == "complete")
    // apply discount here







    share|improve this answer



























    • Where would I put this code?

      – kevando
      Apr 28 '14 at 16:13














    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f18914%2fhow-can-i-give-first-time-customers-a-discount-on-their-next-order%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    I would suggest to create a new discount type "cashback". This can be done using this observer "adminhtml_block_salesrule_actions_prepareform".



    Once this option is added then you can apply the discount by overriding process function of Mage_SalesRule_Model_Validator



    In the process function, you will find switch case as follows




    switch ($rule->getSimpleAction())




    where you can easily add your new discount type "cashback", in this case you can find out if the customer has placed order before or not, if yes then apply discount other don't apply discount.



    The above will work if you are a developer otherwise search for cash back or next order discount on magento connect, there are modules available.



    Like -: for M1 https://www.scommerce-mage.com/magento-next-order-discount.html



    and M2 https://www.scommerce-mage.com/magento-2-next-order-discount.html



    Hope the above helps!



    Cheers
    S






    share|improve this answer































      2














      I would suggest to create a new discount type "cashback". This can be done using this observer "adminhtml_block_salesrule_actions_prepareform".



      Once this option is added then you can apply the discount by overriding process function of Mage_SalesRule_Model_Validator



      In the process function, you will find switch case as follows




      switch ($rule->getSimpleAction())




      where you can easily add your new discount type "cashback", in this case you can find out if the customer has placed order before or not, if yes then apply discount other don't apply discount.



      The above will work if you are a developer otherwise search for cash back or next order discount on magento connect, there are modules available.



      Like -: for M1 https://www.scommerce-mage.com/magento-next-order-discount.html



      and M2 https://www.scommerce-mage.com/magento-2-next-order-discount.html



      Hope the above helps!



      Cheers
      S






      share|improve this answer





























        2












        2








        2







        I would suggest to create a new discount type "cashback". This can be done using this observer "adminhtml_block_salesrule_actions_prepareform".



        Once this option is added then you can apply the discount by overriding process function of Mage_SalesRule_Model_Validator



        In the process function, you will find switch case as follows




        switch ($rule->getSimpleAction())




        where you can easily add your new discount type "cashback", in this case you can find out if the customer has placed order before or not, if yes then apply discount other don't apply discount.



        The above will work if you are a developer otherwise search for cash back or next order discount on magento connect, there are modules available.



        Like -: for M1 https://www.scommerce-mage.com/magento-next-order-discount.html



        and M2 https://www.scommerce-mage.com/magento-2-next-order-discount.html



        Hope the above helps!



        Cheers
        S






        share|improve this answer















        I would suggest to create a new discount type "cashback". This can be done using this observer "adminhtml_block_salesrule_actions_prepareform".



        Once this option is added then you can apply the discount by overriding process function of Mage_SalesRule_Model_Validator



        In the process function, you will find switch case as follows




        switch ($rule->getSimpleAction())




        where you can easily add your new discount type "cashback", in this case you can find out if the customer has placed order before or not, if yes then apply discount other don't apply discount.



        The above will work if you are a developer otherwise search for cash back or next order discount on magento connect, there are modules available.



        Like -: for M1 https://www.scommerce-mage.com/magento-next-order-discount.html



        and M2 https://www.scommerce-mage.com/magento-2-next-order-discount.html



        Hope the above helps!



        Cheers
        S







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jul 31 at 14:44

























        answered Nov 9 '14 at 17:05









        stevensagaarstevensagaar

        1,2538 silver badges25 bronze badges




        1,2538 silver badges25 bronze badges


























            1














            First you need to get the count of the orders that the customer has made:



            $customer_id = some id; 
            $ordersCollection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',$customer_id);
            $orderCount = $ordersCollection->count();
            if($orderCount == 1)
            $order = $ordersCollection->getFirstItem();
            //Check order status (closed, complete etc)
            if($order->getStatusLabel() == "complete")
            // apply discount here







            share|improve this answer



























            • Where would I put this code?

              – kevando
              Apr 28 '14 at 16:13
















            1














            First you need to get the count of the orders that the customer has made:



            $customer_id = some id; 
            $ordersCollection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',$customer_id);
            $orderCount = $ordersCollection->count();
            if($orderCount == 1)
            $order = $ordersCollection->getFirstItem();
            //Check order status (closed, complete etc)
            if($order->getStatusLabel() == "complete")
            // apply discount here







            share|improve this answer



























            • Where would I put this code?

              – kevando
              Apr 28 '14 at 16:13














            1












            1








            1







            First you need to get the count of the orders that the customer has made:



            $customer_id = some id; 
            $ordersCollection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',$customer_id);
            $orderCount = $ordersCollection->count();
            if($orderCount == 1)
            $order = $ordersCollection->getFirstItem();
            //Check order status (closed, complete etc)
            if($order->getStatusLabel() == "complete")
            // apply discount here







            share|improve this answer















            First you need to get the count of the orders that the customer has made:



            $customer_id = some id; 
            $ordersCollection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',$customer_id);
            $orderCount = $ordersCollection->count();
            if($orderCount == 1)
            $order = $ordersCollection->getFirstItem();
            //Check order status (closed, complete etc)
            if($order->getStatusLabel() == "complete")
            // apply discount here








            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 26 '14 at 8:39









            David Manners

            25k9 gold badges62 silver badges213 bronze badges




            25k9 gold badges62 silver badges213 bronze badges










            answered Apr 26 '14 at 8:24









            Evgeni IvanovEvgeni Ivanov

            8969 silver badges15 bronze badges




            8969 silver badges15 bronze badges















            • Where would I put this code?

              – kevando
              Apr 28 '14 at 16:13


















            • Where would I put this code?

              – kevando
              Apr 28 '14 at 16:13

















            Where would I put this code?

            – kevando
            Apr 28 '14 at 16:13






            Where would I put this code?

            – kevando
            Apr 28 '14 at 16:13


















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f18914%2fhow-can-i-give-first-time-customers-a-discount-on-their-next-order%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

            Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?