0

I'm trying to override module-sales-rule and it's not working I have successfully overwritten module-checkout. Here is what I have done.

I have copied all files from

vender/magento/module-sales-rule/view/frontend/

to

app/design/frontend/<vender>/theme/Magento_Sales_Rule/

And have tried just adding the file I want to edit and with no luck.

I have run the following commands

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex 
php bin/magento cache:flush

The command below throws an error

php bin/magento setup:static-content:deploy

Could not parse theme static file '/app/design/frontend/<vender>/theme/Magento_Sales_Rule/web/js/view/cart/totals/discount.js

Any ideas would help thanks

1 Answer 1

1

So it looks like to overwrite module-sales-rule use Magento_SalesRule not Magento_Sales_Rule if anyone else is interested.

1
  • Hi, how can i override /var/www/html/dg/vendor/magento/module-sales-rule/Model/Rule/Condition/Product/Subselect.php
    – Arjun
    Aug 23, 2019 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.