Magento Expert Forum - Improve your Magento experience

Results 1 to 12 of 12

How to display price range for configurable product in Magento 2.

  1. #1
    Junior Member emmanguyen's Avatar
    Join Date
    Nov 2016
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to display price range for configurable product in Magento 2.


  2. #2
    Junior Member
    Join Date
    Oct 2016
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    As you know, configurable products, which have a list of options for variable attributes, is a popular kind of product in Magento sites. Up to now, Magento supported store owners to create configurable products in Magento 2 with simpler steps compared to process in Magento 1. However, displaying configurable products in frontend of Magento site is not an easy-to- solve problem because of its complexity. Most of store owners have demand of showing their configurable product in the most eye-catching way so that customers can see through all of its attribute, make comparison and quickly make buying decision.

    Although Magento 2 has simpler setting up process for configurable product, when displaying in frontend, it still has disadvantages that prevent customers from purchasing quickly.

    Disadvantages of display configurable products in Magento 2
    As you can see, in frontend of default Magento 2, we only can see the entire configurable product with its attributes and options following. Customers only can see the product they want after selecting options and add to cart . It's hard for customers to have a overall review of all possible children products and make comparisons.

    configurable product default Magento 2

    Moreover, in default configurable product page, customers have to add children product to cart one by one rather than adding multiple products to cart in one time. For example, if a customer wants to buy 4 shirts with black color and size S, 10 shirts with gray color and size M, 15 shirts with blue color and size M, he has to add product to cart 3 times. It means how many times customers need to add to cart is equivalent to how many children products he wants to buy. Imagine that a product has 2 attributes with 20 children products and customers want to buy all of them, they must add to cart 20 times! It is such an inconvenience that may annoy customers, especially for wholesalers. If customers want to buy in bulk, they may not be patient enough to repeat add-to-cart action and then quit purchasing. So, you lose an potential customer!
    Optomize your OnPage and Get High Rank Google With - this toolkit - Serplify Pro Review

    Igloo Page Builder Create your Landing page and Sales Page for Page Builder - Buy it and Get Special Gift
    Feedback software for Small business- Convertifire Review - Bonus Free

  3. #3
    Junior Member
    Join Date
    Dec 2016
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here's a solution to this problem that takes into account the potential for configurable products having more than one price-changing attribute.
    It's written in the form of function that takes a configurable product id, and returns a string of min to max price.
    Code:
    function getPriceRange($productId) {
    
     $max = '';
     $min = '';
    
     $pricesByAttributeValues = array();
    
     $product = Mage::getModel('catalog/product')->load($productId); 
     $attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
     $basePrice = $product->getFinalPrice();
    
     foreach ($attributes as $attribute){
        $prices = $attribute->getPrices();
        foreach ($prices as $price){
            if ($price['is_percent']){ //if the price is specified in percents
                $pricesByAttributeValues[$price['value_index']] = (float)$price['pricing_value'] * $basePrice / 100;
            }
            else { //if the price is absolute value
                $pricesByAttributeValues[$price['value_index']] = (float)$price['pricing_value'];
            }
        }
     }
    
    
     $simple = $product->getTypeInstance()->getUsedProducts();
    
     foreach ($simple as $sProduct){
        $totalPrice = $basePrice;
    
        foreach ($attributes as $attribute){
    
            $value = $sProduct->getData($attribute->getProductAttribute()->getAttributeCode());
            if (isset($pricesByAttributeValues[$value])){
                $totalPrice += $pricesByAttributeValues[$value];
            }
        }
        if(!$max || $totalPrice > $max)
            $max = $totalPrice;
        if(!$min || $totalPrice < $min)
            $min = $totalPrice;
     }
    
     return "$min - $max";
    
    }

  4. #4
    Junior Member
    Join Date
    Dec 2016
    Posts
    77
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Pallavi_G View Post
    Here's a solution to this problem that takes into account the potential for configurable products having more than one price-changing attribute.
    It's written in the form of function that takes a configurable product id, and returns a string of min to max price.
    Code:
    function getPriceRange($productId) {
    
     $max = '';
     $min = '';
    
     $pricesByAttributeValues = array();
    
     $product = Mage::getModel('catalog/product')->load($productId); 
     $attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
     $basePrice = $product->getFinalPrice();
    
     foreach ($attributes as $attribute){
        $prices = $attribute->getPrices();
        foreach ($prices as $price){
            if ($price['is_percent']){ //if the price is specified in percents
                $pricesByAttributeValues[$price['value_index']] = (float)$price['pricing_value'] * $basePrice / 100;
            }
            else { //if the price is absolute value
                $pricesByAttributeValues[$price['value_index']] = (float)$price['pricing_value'];
            }
        }
     }
    
    
     $simple = $product->getTypeInstance()->getUsedProducts();
    
     foreach ($simple as $sProduct){
        $totalPrice = $basePrice;
    
        foreach ($attributes as $attribute){
    
            $value = $sProduct->getData($attribute->getProductAttribute()->getAttributeCode());
            if (isset($pricesByAttributeValues[$value])){
                $totalPrice += $pricesByAttributeValues[$value];
            }
        }
        if(!$max || $totalPrice > $max)
            $max = $totalPrice;
        if(!$min || $totalPrice < $min)
            $min = $totalPrice;
     }
    
     return "$min - $max";
    
    }
    Thanks, man

  5. #5
    Junior Member marknguyen's Avatar
    Join Date
    Nov 2015
    Posts
    622
    Thanks
    6
    Thanked 33 Times in 33 Posts

    Default

    You can try this extension: Configurable Product Wholesale Display for Magento 2.
    The module supports showing price range of configurable products. Beside, it can show all associated products in a grid table view so that wholesale customers can order configurable products with larger number and add all chosen items to cart at ease.



    Hope it helps.
    Attached Images Attached Images  

  6. #6
    Junior Member
    Join Date
    Jan 2018
    Location
    New York
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hide Price for Magento 2

    Magento 2 Hide Price extension review is a great tool for shop owners to hide prices with non-logged users. With this tool, it requires users to register and login to view the price of the product. This will help shoppers reach customers and increase sales effectiveness.
    Hide product prices and "Add to cart" button for specific products or whole categories. Manage prices display depending on customer groups. Customize button texts and messages to make your pricing policy maximally flexible.
    A well thought out pricing policy ensures high conversions and customer loyalty. If you are looking for a tool to easily manage price display on product and category pages, the Hide Price extension for Magento 2 is exactly what you need. The module lets you hide prices of specific products for particular customer groups or guest visitors. Apart from that, you can remove or replace the 'Add to cart' option with a custom button to encourage customers specify their contact info or perform the action you need. This way you'll demonstrate a personal approach to each customer and effectively adjust prices to your business needs.
    This tool allows hiding prices of products if users do not register or login account on the website. With this useful feature, customers will stay on your site longer to find the price of the product, which increases the time on-site and improves the user's buying experience
    With Hide Price extension Magento 2, you can easily manage the display of prices of products on the website. In addition, it also makes it convenient for you to reach your customers and improve the user's buying experience.

  7. #7
    Junior Member
    Join Date
    May 2018
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Configurable Product Wholesale Display for Magento 2. use this extension

  8. #8
    Junior Member aaronwallace's Avatar
    Join Date
    Nov 2013
    Posts
    417
    Thanks
    4
    Thanked 9 Times in 9 Posts

    Default

    Special EID Sale Offers And Discounts On All M1 and M2 Extensions.
    Seasonal Sale Is On!
    Get Flat 50%
    OFF On Premium Magento 1 & 2 Extensions

    Use Coupon Code: OFF50



    On this special
    occasion of EID SoftProdigy offers a great discount on all top quality premium Magento extensions which make your eCommerce store more reliable and help to engage more customers.

    Don’t forget to check these extensions:

    Magento 2 most selling extensions:


    Daily Deals / Multiple-deals Magento 2 Extension

    Launch great deals daily and schedule multiple promotions to increase customer base using Daily Deal extension for Magento2. This extension stimulates customers to buy more products before the deal expires by offering discounts, thereby saving their money. Multiple deals are supported, with featured deals easily highlighted.

    Blue Dart Shipping Extension Magento 2.0 extension

    Blue Dart Shipment Integration extension for Magento2 is the smartest way to let your customers check the availability of Cash on Delivery option for a particular region or the Total Price of the order. A PDF, including product and user details, is sent to
    salesdepartment for every sale.

    Request a Quote magento2 extension

    Request a Quote Extension for Magento2 allows online shoppers to interact with the store owners and suggest
    a desiredquote for products they wish to purchase. This extension supports various product types.

    One-Step Checkout magento2 extension

    One-Page Checkout Magento2 Extension offers online shoppers a 40% faster checkout with dynamic loading and other features that make it a must-have for every
    eRetail store. It helps reduce the cart abandonment rate while increasing your sales 2x while enhancing user experience.

    Gifting Reminders magento2 extension

    Never miss a single important event with Gifting Reminders and Cross Sales Magento2 Extension. This allows online buyers to set reminders for special events like birthdays and anniversaries and notify them as the date approaches.

    Get Deals On All Magento Extensions And Woocommerce Plugins!

  9. #9
    Junior Member DavidSingletary's Avatar
    Join Date
    Mar 2014
    Location
    New York
    Posts
    40
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Magento Product Configurator - Design'N'Buy web 2 Print Software

    Display price range for the Magento product configurator you have to discuss with Design'N'Buy Magento Expert Team. DNB is Single product who work on Magento 2 product configurator.

  10. #10
    New member
    Join Date
    Jun 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by DavidSingletary View Post
    Display price range for the https://www.designnbuy.com/printcommerce-magento-product-designer-software.html&quot;]Magento product configurator[/URL] you have to discuss with Design'N'Buy Magento Expert Team. DNB is Single product who work on Magento 2 product configurator.
    gunny treĂªn zing me

  11. #11
    New member
    Join Date
    Jun 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by DavidSingletary View Post
    Display price range for the https://www.designnbuy.com/printcommerce-magento-product-designer-software.html&quot;]Magento product configurator[/URL] you have to discuss with Design'N'Buy Magento Expert Team. DNB is Single product who work on Magento 2 product configurator.
    download gunny ve may tinh

  12. #12
    New member
    Join Date
    Jul 2018
    Location
    King County, 98056 Newcastle, United States
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    oday we’re going to look at the advantages of using configurable products and how we can update how their prices display on Magento 2 product listing pages to provide our customers with a more transparent shopping experience. Before we dig deeper, let’s talk briefly about what configurable products are.

    Configurable products differ from simple products in that they provide the customer with numerous options that ultimately reduce down to a simple product choice. The power of configurable products really shines on product listing pages, where a single configurable product may act as a doorway to literally hundreds of simple product variations. For instance, a t-shirt configurable product with 10 color options and 3 size options would essentially allow the customer to choose from one of 30 tangible simple products, without being overwhelmed with all 30 products on the listing page itself.


    Note:- A1 Senior Care Advisors your local free senior living, Placement & Care Referral Services in washington dc With having over 20 years experience in Senior Living & Health Care.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •