It is not possible to change the price of custom options at different scopes. If you change the scope when editing a product and change the price of a custom option the value is changed across all scopes. This functionality was present in Magento 1.
Price of the custom option should be different at the storeview scope.
Price of the custom option is changed to the new value at all scope levels
@alexgoodey Please, provide the used Magento version.
Magento CE 2.1.0
Thank you for your submission.
We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.
Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).
We are closing this GitHub ticket and have moved your request to the new forum.
@piotrekkaminski @antboiko Is this problem solved ?
I have the same problem when editing the product.
My magento version is Magento CE 2.1.0
Thanks
@piotrekkaminski
We've reproduced the issue on the latest Magento 2.1.7 and upcoming 2.2 (and latest Magento 1.x).
This is a major problem especially for multi-currency websites, not a feature request.
Imagine USD and EUR websites selling the same SKU with custom option w surcharge.
Obviously, the price amount needs to be different in different currencies.
This bug prevents saving unique surcharge amount for each website.
Please reopen the ticket.
Thanks.
@alexgoodey
The following Precondition is necessary to reproduce the test case:
Configuration > Catalog > Price > Catalog Price Scope: Website
Otherwise the prices are Global and don't vary per Website.
The workaround in a form of a custom module.
Tested on Magento 2.1.4.
File app/code/Example/CatalogOptionFix/Model/ResourceModel/Product/Option/Value.php:
<?php
namespace Example\CatalogOptionFix\Model\ResourceModel\Product\Option;
class Value extends \Magento\Catalog\Model\ResourceModel\Product\Option\Value
{
protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $object)
{
$originalStoreId = $object->getStoreId();
$storeId = $originalStoreId === null ? true : $originalStoreId;
$object->setStoreId($storeId);
try {
parent::_saveValuePrices($object);
} finally {
$object->setStoreId($originalStoreId);
}
}
}
File app/code/Example/CatalogOptionFix/etc/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="Magento\Catalog\Model\ResourceModel\Product\Option\Value" type="Example\CatalogOptionFix\Model\ResourceModel\Product\Option\Value"/>
</config>