how to give discount on payment methods?
solve criteria
01 Option "Payment Method" is not showing up in Conditions Tab. I want to give some discount on specific payment methods.
02 how to add Payment Method in to cart Attribute
after added result will show like this
Payment Method add to cart Attribute |
we will see how to add this
01 open file path
we should open address.php it may have in your below file path check which directory have it
Magento\SalesRule\Model\Rule\Condition\Address.php
or
/var/www/magento/vendor/magento/module-sales-rule/
check some file path then you can see file
02 open address.php
and add this
copy and paste this text
'payment_method' => __('Payment Method'),
03 open etc\di.xml file
app\code\magento\SalesRule\etc\di.xml or
it will /var/www/magento/vendor/magento/module-sales-rule/etc
option 01
paste this code bellow or top
<preference for="Magento\Rule\Model\Condition\AbstractCondition"
type="Magento\SalesRule\Model\Rule\Condition\Address" />
if not
some PC/server may have it like this way
option 02
app\code\magento\SalesRule\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\SalesRule\Model\Rule\Condition\Address" type="Magento\SalesRule\Model\Rule\Condition\Address" />
</config>
04 open again address.php
check this class name
option 01
some time it may show bellow way check any one match with you option 02
* see this this path MUST be same with your di.xml preference path
see above tow image path same
this is other pc way (this path should be same)
option 02
if not work or success tell me we will send update within 1hr
that's all
next
when go magneto cart rune now should show
0 Comments