Benchmark (Simple Product w/Product Options) versus (Configurable Product)

For a long time only simple products with custom options such as size and color were used in the stores I provide maintenance for. Being about stores that had all the variants in stock there was no problem of creating dependencies between the variants.

Recently I encountered a new situation where not all variants are available in stock and then I had to analyze between going for (Configurable Product + Aitoc Configurable Product Pro) or (Simple Product + Mageworx Advanced Product Options). If I choose for the first option, I don’t really like the fact that for a product that has 6 sizes and 6 colors I will get 36 simple products. In addition, obviously if there are 1.000 products in the first variant there will be 36.000 simple products while in the second variant only 1.000.

Has anyone ever made a benchmark of a store with simple products and one with configurable?

magento2.4.1 – Where is configurable product variation suffix created?

magento2.4.1 – Where is configurable product variation suffix created? – Magento Stack Exchange

php – Magento 2, programmatically create configurable products

Hello I have the necessity of creating both simpe and configurable products.

This is what (following online guidelines) I have right now:

$bootstrap = Bootstrap::create(BP, $params);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('MagentoFrameworkAppState');
$state->setAreaCode('frontend');
$salt = rand(10, 999);

//REGARDING SIMPLE PRODUCTS
$simple_product = $objectManager->create('MagentoCatalogModelProduct');
$simple_product->setSku('test-simple' . $salt);
$simple_product->setName('test name simple' . $salt);
$simple_product->setAttributeSetId(9); //my own attribute set 

$simple_product->setData('157', '9'); // my custom attribute flavor and it's assigned value

$simple_product->setStatus(1);
$simple_product->setTypeId('simple');
$simple_product->setPrice(10);
$simple_product->setWebsiteIds(array(1));
$simple_product->setCategoryIds(array(14)); //it's category
$simple_product->setStockData(array(
    'use_config_manage_stock' => 0, //'Use config settings'?
    'manage_stock' => 1, //manage stock
    'min_sale_qty' => 1, //Minimum Qty Allowed in Shopping Cart
    'max_sale_qty' => 2, //Maximum Qty Allowed in Shopping Cart
    'is_in_stock' => 1, //Stock Availability
    'qty' => 100 //qty
    )
);
$simple_product->save();

$productRepository = $objectManager->get('MagentoCatalogApiProductRepositoryInterface');
$product = $productRepository->getById($simple_product->getId());
$product->setFlavor('BBBB');  //my custom attribute is called flavor and BBBB it's is value
$product->getResource()->saveAttribute($product, 'flavor');

$simple_product_id = $simple_product->getId(); //get ID
echo "simple product id: ".$simple_product_id."n";

This works just perfect, now I’d like to create a configurable product and assign this product to it:

//REGARDING CONFIGURABLE PRODUCTS
$configurable_product = $objectManager->create('MagentoCatalogModelProduct');
$configurable_product->setSku('test-configurable' . ++$salt);
$configurable_product->setName('test name configurable' . ++$salt);
$configurable_product->setAttributeSetId(9);
$configurable_product->setStatus(1);
$configurable_product->setTypeId('configurable');
$configurable_product->setPrice(11);
$configurable_product->setWebsiteIds(array(1));
$configurable_product->setCategoryIds(array(14));
$configurable_product->setStockData(array(
    'use_config_manage_stock' => 0, 
    'manage_stock' => 1, 
    'is_in_stock' => 1, 
    'qty' => 999
    )
);

$configurable_product->getTypeInstance()->setUsedProductAttributeIds(array(157),$configurable_product); //attribute ID of attribute flavor

$configurableAttributesData = $configurable_product->getTypeInstance()->getConfigurableAttributesAsArray($configurable_product);

$configurable_product->setCanSaveConfigurableAttributes(true);
$configurable_product->setConfigurableAttributesData($configurableAttributesData);

$configurableProductsData = array();
$configurableProductsData($simple_product_id) = array( //our simple product ID
    '0' => array(
        'label' => 'gusto', //attribute label
        'attribute_id' => '157', //attribute ID of attribute 'flavor' in my store
        'value_index' => '9', //value of 'BBBB' index of the attribute 
        'is_percent'    => 0,
        'pricing_value' => '10',
    )
);


$configurable_product->setConfigurableProductsData($configurableProductsData);

$configurable_product->save();

echo "configurable product id: ".$configurable_product->getId()."n";

I successifully create both products, but the simple is not associated with the configurable one.

Of course I do something wrong…. can you please guide me in the right direction?

Configurable Product no options loaded “configurableWidget is undefined”

there is a problem we cannot solve and even not reproduce correct.
the error seems only to appear in firefox. on https://bio-chem.eu/haushalt.html click on the 7th product “Bio Allzweckreiniger”. on the product page sometimes the options are not loaded. it looks like this:
Text

Hit Reload, open the product directly with the link or using another browser works fine:
Text

The Console says “Uncaught TypeError: can’t access property “element”, configurableWidget is undefined”
Text

Can anyone reproduce the error or even figured out, whats going wrong there?

seo – Is uniting different variations of a same product under a single configurable product a good idea?

Maybe this isn’t fully related to Magento, but I don’t know where else to ask.

I work for an hardware store and we are showing more and more products on our online catalog.

It is obvious that catalog pages will become overcrowded with different variations of the same product, especially since we specialize in screws, nuts and bolts. Already, this can be seen with sockets, or screwdrivers, of different sizes.

The storefront has multiple filters to help the customers find what they need, but at the same time I wonder if filters are either not enough, or if they are going to scare away lazy customers who don’t want to click around too much.

So, I wish to unite those kind of items under configurable products, but will it have any impact on search engine results in the long run?

Thanks,

magento2 – Can’t update old Configurable Products after update from Magento 2.3 to Magento 2.4.1

when I update Magento from 2.3 to 2.4.1, I can’t save the old Configurable Products, it said that error “SQLSTATE(42000): Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘))’ at line 2, query was: SELECT main_table.*, cp_table.type_id FROM cataloginventory_stock_item AS main_table INNER JOIN catalog_product_entity AS cp_table ON main_table.product_id = cp_table.entity_id WHERE (main_table.website_id = ‘0’) AND (main_table.product_id IN())”,

but when create a new Configurable Products, it still works perfect.

enter image description here

Do anyone have same problem, please help. Thanks.

After overriding module-catalog/final_price.phtml ‘From price’ ‘disappears from configurable products

My override of module-catalog/final_price.phtml makes the ‘From’ disappear from the price for configurable products. module-configurable-product too has a final_price.phtml in the same path as module-catalog /view/base/templates/product/price/final_price.phtml. Can’t figure out why module-configurable-product is not using it’s own final_price.phtml anymore if i override module-catalog.

Note: In german it says “Ab 15,99 €” for a configurable product for example, but the “Ab” is gone after override.

module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="MyVendor_MyModule" setup_version="1.0.0">
    <sequence>
        <module name="Magento_Eav" />
        <module name="Magento_Cms" />
        <module name="Magento_Indexer" />
        <module name="Magento_Customer" />
        <module name="Magento_Catalog" />
    </sequence>
    </module>
</config>

di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoCatalogPricingRenderFinalPriceBox" type="MyVendorMyModulePricingRenderFinalPriceBox" />
</config>

catalog_product_prices.xml

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <block class="MagentoFrameworkPricingRenderRendererPool" name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="default_render_class" xsi:type="string">MagentoCatalogPricingRenderPriceBox</item>
                <item name="default_render_template" xsi:type="string">Magento_Catalog::product/price/default.phtml</item>
                <item name="default_amount_render_class" xsi:type="string">MagentoFrameworkPricingRenderAmount</item>
                <item name="default_amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
                <item name="prices" xsi:type="array">
                    <item name="special_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/special_price.phtml</item>
                    </item>
                    <item name="tier_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/tier_prices.phtml</item>
                    </item>
                    <item name="final_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">MagentoCatalogPricingRenderFinalPriceBox</item>
                        <item name="render_template" xsi:type="string">MyVendor_MyModule::product/price/final_price.phtml</item>
                    </item>
                    <item name="custom_option_price" xsi:type="array">
                        <item name="amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
                    </item>
                    <item name="configured_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">MagentoCatalogPricingRenderConfiguredPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/configured_price.phtml</item>
                    </item>
                </item>
                <item name="adjustments" xsi:type="array"></item>
            </argument>
        </arguments>
    </block>
</layout>

magento2 – Export and Import configurable product price changes

I couldn’t anywhere find a solution to my question, so I decided to post here.

I have added a configureable product to my store with 2 attributes (dimensions and material) both have different sku’s for each combination and different prices.

Now I managed to export the data, edited the prices, uploaded it again, but when viewing the “configurable product” in configuration and shop frontend still the old prices show up.

Does anybody know what I might have overlooked?!

Thanks in advance!
Michael

collection – Magento 2 Remove configurable products from product listing page programatically

I am trying to remove configurable products from product collection, as a result products are being filtered correctly but pagination is not working as expected and showing wrong count.

Below is the change I have made in MagentoCatalogModelLayer using preference and plugin both but pagination is not working as expected.
Below is my logic in the class mentioned:

public function getProductCollection()
    {
        if (isset($this->_productCollections($this->getCurrentCategory()->getId()))) {
            $collection = $this->_productCollections($this->getCurrentCategory()->getId());
        } else {
            $collection = $this->collectionProvider->getCollection($this->getCurrentCategory());
            $this->prepareProductCollection($collection);
            $this->_productCollections($this->getCurrentCategory()->getId()) = $collection;
        }

        $collection->addAttributeToFilter('type_id', ('neq'=>"configurable"));
        return $collection;
    }

I am using version 2.4.1-p1. Please let me know how I can manage this.

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies