Get tiered price by customer group idGetting Current Customer Group Price, and Tier PriceGroup Price ReportHowto disable Price per Customer group?Multi Select Customer Group Promotion Price Rules Not Appliedcustomer group restriction and price managementCopy Customer Group and Group PriceHow to add price for the customer group and add it to the customer registration pageMagento 2: How to display all Customer Group Price on Product Detail PageMagento 2.2.1 Bug price by customer group not working after add to cartHow to get all bundle items price as per selected customer group level price?Get Product price by customer Group magento 2

Is Diceware more secure than a long passphrase?

How do I produce this Greek letter koppa: Ϟ in pdfLaTeX?

Can a Bard use the Spell Glyph option of the Glyph of Warding spell and cast a known spell into the glyph?

Apply a different color ramp to subset of categorized symbols in QGIS?

Where was the County of Thurn und Taxis located?

Work requires me to come in early to start computer but wont let me clock in to get paid for it

Contradiction proof for inequality of P and NP?

How exactly does Hawking radiation decrease the mass of black holes?

Why do real positive eigenvalues result in an unstable system? What about eigenvalues between 0 and 1? or 1?

A faster way to compute the largest prime factor

Should the Product Owner dictate what info the UI needs to display?

How to be good at coming up with counter example in Topology

What is the unit of time_lock_delta in LND?

Island of Knights, Knaves and Spies

Philosophical question on logistic regression: why isn't the optimal threshold value trained?

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

What is the best way to deal with NPC-NPC combat?

Could moose/elk survive in the Amazon forest?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

How to have a sharp product image?

How can I wire a 9-position switch so that each position turns on one more LED than the one before?

How to pronounce 'c++' in Spanish

Is there a word for the censored part of a video?

SFDX - Create Objects with Custom Properties



Get tiered price by customer group id


Getting Current Customer Group Price, and Tier PriceGroup Price ReportHowto disable Price per Customer group?Multi Select Customer Group Promotion Price Rules Not Appliedcustomer group restriction and price managementCopy Customer Group and Group PriceHow to add price for the customer group and add it to the customer registration pageMagento 2: How to display all Customer Group Price on Product Detail PageMagento 2.2.1 Bug price by customer group not working after add to cartHow to get all bundle items price as per selected customer group level price?Get Product price by customer Group magento 2






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








0















I'm writing a maintenance script to tidy up unused customer group tiered prices. How can I programatically get either:
All products that have a tiered price for the selected customer group and then delete the tiered price for that group
OR
Check if a product has a tiered price for the selected customer group and then delete the tiered price for that group.



Bear in mind I don't know the quantity, only the group id so I can't use getTierPrice() as that needs a quantity.



How do I delete the tiered price? Can I just use setTierPrice() and set the price and quantity to 0?










share|improve this question
























  • Possible duplicate of Getting Current Customer Group Price, and Tier Price

    – Teja Bhagavan Kollepara
    Dec 28 '17 at 16:01

















0















I'm writing a maintenance script to tidy up unused customer group tiered prices. How can I programatically get either:
All products that have a tiered price for the selected customer group and then delete the tiered price for that group
OR
Check if a product has a tiered price for the selected customer group and then delete the tiered price for that group.



Bear in mind I don't know the quantity, only the group id so I can't use getTierPrice() as that needs a quantity.



How do I delete the tiered price? Can I just use setTierPrice() and set the price and quantity to 0?










share|improve this question
























  • Possible duplicate of Getting Current Customer Group Price, and Tier Price

    – Teja Bhagavan Kollepara
    Dec 28 '17 at 16:01













0












0








0








I'm writing a maintenance script to tidy up unused customer group tiered prices. How can I programatically get either:
All products that have a tiered price for the selected customer group and then delete the tiered price for that group
OR
Check if a product has a tiered price for the selected customer group and then delete the tiered price for that group.



Bear in mind I don't know the quantity, only the group id so I can't use getTierPrice() as that needs a quantity.



How do I delete the tiered price? Can I just use setTierPrice() and set the price and quantity to 0?










share|improve this question
















I'm writing a maintenance script to tidy up unused customer group tiered prices. How can I programatically get either:
All products that have a tiered price for the selected customer group and then delete the tiered price for that group
OR
Check if a product has a tiered price for the selected customer group and then delete the tiered price for that group.



Bear in mind I don't know the quantity, only the group id so I can't use getTierPrice() as that needs a quantity.



How do I delete the tiered price? Can I just use setTierPrice() and set the price and quantity to 0?







magento-1.9 customer-group tierprice






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '15 at 18:28









Amit Bera

60.3k1678178




60.3k1678178










asked Nov 23 '15 at 14:33









Denial DesignDenial Design

9813




9813












  • Possible duplicate of Getting Current Customer Group Price, and Tier Price

    – Teja Bhagavan Kollepara
    Dec 28 '17 at 16:01

















  • Possible duplicate of Getting Current Customer Group Price, and Tier Price

    – Teja Bhagavan Kollepara
    Dec 28 '17 at 16:01
















Possible duplicate of Getting Current Customer Group Price, and Tier Price

– Teja Bhagavan Kollepara
Dec 28 '17 at 16:01





Possible duplicate of Getting Current Customer Group Price, and Tier Price

– Teja Bhagavan Kollepara
Dec 28 '17 at 16:01










2 Answers
2






active

oldest

votes


















0














$roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
$TierPrice = $product->getData('tier_price');
$customer_grouptier = array_column($TierPrice, 'price','cust_group');
$customer_tier = $customer_grouptier[$roleId];


$product is the product Object.


More information click below.
Getting Current Customer Group Price, and Tier Price






share|improve this answer
































    -1














    Go to magento admin > product manager > edit a producct > price tab, add price according to customer group, then use the below code to display the price according to customer group ID but you need to loged-in first a customer to check the customer ID



    $now = Mage::getSingleton('core/date')->timestamp( time() );
    $websiteId = Mage::app()->getStore()->getWebsiteId();
    $customerGroup = 4; /* get logged-in customer group ID */

    Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId);


    If you are in product listing OR detail page you can also use this code:



    $product = Mage::getModel('catalog/product')->load($productId);


    $groupPrices = $product->getData('group_price')



    Enjoy! it will help you.






    share|improve this answer























    • Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

      – Denial Design
      Nov 23 '15 at 19:01












    • you have added price as per group from admin?

      – Surya prakash Patel
      Nov 24 '15 at 6:29











    • Yes, the tiered prices have been added.

      – Denial Design
      Nov 24 '15 at 10:38











    • Not Tire prices, add "Group Price" and then check again

      – Surya prakash Patel
      Nov 24 '15 at 11:14











    • I'm not using group prices, I'm using tiered pricing.

      – Denial Design
      Nov 24 '15 at 11:42











    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%2f91250%2fget-tiered-price-by-customer-group-id%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









    0














    $roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
    $TierPrice = $product->getData('tier_price');
    $customer_grouptier = array_column($TierPrice, 'price','cust_group');
    $customer_tier = $customer_grouptier[$roleId];


    $product is the product Object.


    More information click below.
    Getting Current Customer Group Price, and Tier Price






    share|improve this answer





























      0














      $roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
      $TierPrice = $product->getData('tier_price');
      $customer_grouptier = array_column($TierPrice, 'price','cust_group');
      $customer_tier = $customer_grouptier[$roleId];


      $product is the product Object.


      More information click below.
      Getting Current Customer Group Price, and Tier Price






      share|improve this answer



























        0












        0








        0







        $roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
        $TierPrice = $product->getData('tier_price');
        $customer_grouptier = array_column($TierPrice, 'price','cust_group');
        $customer_tier = $customer_grouptier[$roleId];


        $product is the product Object.


        More information click below.
        Getting Current Customer Group Price, and Tier Price






        share|improve this answer















        $roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
        $TierPrice = $product->getData('tier_price');
        $customer_grouptier = array_column($TierPrice, 'price','cust_group');
        $customer_tier = $customer_grouptier[$roleId];


        $product is the product Object.


        More information click below.
        Getting Current Customer Group Price, and Tier Price







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:55









        Community

        1




        1










        answered Nov 28 '16 at 10:21









        CrockCrock

        454313




        454313























            -1














            Go to magento admin > product manager > edit a producct > price tab, add price according to customer group, then use the below code to display the price according to customer group ID but you need to loged-in first a customer to check the customer ID



            $now = Mage::getSingleton('core/date')->timestamp( time() );
            $websiteId = Mage::app()->getStore()->getWebsiteId();
            $customerGroup = 4; /* get logged-in customer group ID */

            Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId);


            If you are in product listing OR detail page you can also use this code:



            $product = Mage::getModel('catalog/product')->load($productId);


            $groupPrices = $product->getData('group_price')



            Enjoy! it will help you.






            share|improve this answer























            • Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

              – Denial Design
              Nov 23 '15 at 19:01












            • you have added price as per group from admin?

              – Surya prakash Patel
              Nov 24 '15 at 6:29











            • Yes, the tiered prices have been added.

              – Denial Design
              Nov 24 '15 at 10:38











            • Not Tire prices, add "Group Price" and then check again

              – Surya prakash Patel
              Nov 24 '15 at 11:14











            • I'm not using group prices, I'm using tiered pricing.

              – Denial Design
              Nov 24 '15 at 11:42















            -1














            Go to magento admin > product manager > edit a producct > price tab, add price according to customer group, then use the below code to display the price according to customer group ID but you need to loged-in first a customer to check the customer ID



            $now = Mage::getSingleton('core/date')->timestamp( time() );
            $websiteId = Mage::app()->getStore()->getWebsiteId();
            $customerGroup = 4; /* get logged-in customer group ID */

            Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId);


            If you are in product listing OR detail page you can also use this code:



            $product = Mage::getModel('catalog/product')->load($productId);


            $groupPrices = $product->getData('group_price')



            Enjoy! it will help you.






            share|improve this answer























            • Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

              – Denial Design
              Nov 23 '15 at 19:01












            • you have added price as per group from admin?

              – Surya prakash Patel
              Nov 24 '15 at 6:29











            • Yes, the tiered prices have been added.

              – Denial Design
              Nov 24 '15 at 10:38











            • Not Tire prices, add "Group Price" and then check again

              – Surya prakash Patel
              Nov 24 '15 at 11:14











            • I'm not using group prices, I'm using tiered pricing.

              – Denial Design
              Nov 24 '15 at 11:42













            -1












            -1








            -1







            Go to magento admin > product manager > edit a producct > price tab, add price according to customer group, then use the below code to display the price according to customer group ID but you need to loged-in first a customer to check the customer ID



            $now = Mage::getSingleton('core/date')->timestamp( time() );
            $websiteId = Mage::app()->getStore()->getWebsiteId();
            $customerGroup = 4; /* get logged-in customer group ID */

            Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId);


            If you are in product listing OR detail page you can also use this code:



            $product = Mage::getModel('catalog/product')->load($productId);


            $groupPrices = $product->getData('group_price')



            Enjoy! it will help you.






            share|improve this answer













            Go to magento admin > product manager > edit a producct > price tab, add price according to customer group, then use the below code to display the price according to customer group ID but you need to loged-in first a customer to check the customer ID



            $now = Mage::getSingleton('core/date')->timestamp( time() );
            $websiteId = Mage::app()->getStore()->getWebsiteId();
            $customerGroup = 4; /* get logged-in customer group ID */

            Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId);


            If you are in product listing OR detail page you can also use this code:



            $product = Mage::getModel('catalog/product')->load($productId);


            $groupPrices = $product->getData('group_price')



            Enjoy! it will help you.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 23 '15 at 16:07









            Surya prakash PatelSurya prakash Patel

            184119




            184119












            • Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

              – Denial Design
              Nov 23 '15 at 19:01












            • you have added price as per group from admin?

              – Surya prakash Patel
              Nov 24 '15 at 6:29











            • Yes, the tiered prices have been added.

              – Denial Design
              Nov 24 '15 at 10:38











            • Not Tire prices, add "Group Price" and then check again

              – Surya prakash Patel
              Nov 24 '15 at 11:14











            • I'm not using group prices, I'm using tiered pricing.

              – Denial Design
              Nov 24 '15 at 11:42

















            • Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

              – Denial Design
              Nov 23 '15 at 19:01












            • you have added price as per group from admin?

              – Surya prakash Patel
              Nov 24 '15 at 6:29











            • Yes, the tiered prices have been added.

              – Denial Design
              Nov 24 '15 at 10:38











            • Not Tire prices, add "Group Price" and then check again

              – Surya prakash Patel
              Nov 24 '15 at 11:14











            • I'm not using group prices, I'm using tiered pricing.

              – Denial Design
              Nov 24 '15 at 11:42
















            Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

            – Denial Design
            Nov 23 '15 at 19:01






            Sorry but that doesn't seem to work. If I echo: $price = Mage::getResourceModel('catalogrule/rule')->getRulePrice( $now, $websiteId, $customerGroup, $_productId); it doesn't return anything

            – Denial Design
            Nov 23 '15 at 19:01














            you have added price as per group from admin?

            – Surya prakash Patel
            Nov 24 '15 at 6:29





            you have added price as per group from admin?

            – Surya prakash Patel
            Nov 24 '15 at 6:29













            Yes, the tiered prices have been added.

            – Denial Design
            Nov 24 '15 at 10:38





            Yes, the tiered prices have been added.

            – Denial Design
            Nov 24 '15 at 10:38













            Not Tire prices, add "Group Price" and then check again

            – Surya prakash Patel
            Nov 24 '15 at 11:14





            Not Tire prices, add "Group Price" and then check again

            – Surya prakash Patel
            Nov 24 '15 at 11:14













            I'm not using group prices, I'm using tiered pricing.

            – Denial Design
            Nov 24 '15 at 11:42





            I'm not using group prices, I'm using tiered pricing.

            – Denial Design
            Nov 24 '15 at 11:42

















            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%2f91250%2fget-tiered-price-by-customer-group-id%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

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form