magento2 – Magento 2 : responsible code for coupon apply

Open the vendor/magento/module-sales-rule/Model/Validator.php class, Then check the following method:

public function process(AbstractItem $item)

Now open: vendor/magento/module-sales-rule/Model/RulesApplier.php
and check:

public function applyRules($item, $rules, $skipValidation, $couponCode)

and

protected function applyRule($item, $rule, $address, $couponCode)

(Update)

The following location you have all discount type:

vendor/magento/module-sales-rule/Model/Rule/Action/Discount

Open vendor/magento/module-sales-rule/Model/Rule/Action/Discount/ToFixed.php and check the following method:

public function calculate($rule, $item, $qty)

(Update (2021-07-17))

Try to add following code after $this->applyRule( in vendor/magento/module-sales-rule/Model/RulesApplier.php:: public function applyRules($item, $rules, $skipValidation, $couponCode)

if ($item->getDiscountAmount() <= 0 ) {
    continue;
}

Don’t write the core, you can create a patch or overwrite that class. It’s a bad class which means lots of private property and method of that class.

magento2.3 – Coupon code should not apply if action condition fit or not discount happen

Please help me with this

There are conditions and Action tab in the coupon code add/edit page and there is a conditional option where we select on which product this code should apply or not like we set SKU or something or set condition buy x and get y for this much.

My question is how can a coupon code refuse to set if the discount is zero?

For now, the coupon code gets set but the discount won’t get so it makes little confusion for the users

Hoping for Good.
Thanks

UpCloud VPS Promo Code – Get Free $25 Credit Coupon | Proxies-free

UpCloud is a growing cloud provider that includes fast storage in their server offerings at an affordable price point. They have datacenters in Germany, Finland, Netherlands, Singapore, United Kingdom, and USA… and counting!

This is a reputable VPS provider, I have using Upcloud two years and currently I am still using them for all my project

If you don’t have an account yet, sign up using this link with our promo code to get $25 in your UpCloud account: https://upcloud.com/signup/?promo=7WC35P

Promo Code: 7WC35P

> Important thing is you need to add $10 deposit to make your account permanent (read Upcloud email after your account activated)

UpCloud is simple to set up and simple to use and cheap cloud hosting provider which has its own distinct features.

(​IMG)

Unique features of UpCloud cloud hosting

High, consistent performance with MaxIOPS

All cloud servers are deployed on enterprise-grade hardware. Together with UpCloud’s in-house developed software and proprietary MaxIOPS storage technology, you will get industry-leading performance at all times. Cloud servers are deployed in less than 45 seconds. With incredibly fast boot times, you will get up and running within minutes.

Easy and Flexible Scaling

Deploy using a preconfigured plan or configure each resource (CPU, RAM, Storage, and IP-addresses) individually with UpCloud’s freely configurable cloud servers. You can always switch between preconfigured plans and freely configurable resource limits, whenever you desire.

Floating IPs and Private Networking

Create your own 100% private network, which is interconnected between all UpCloud’s data centers. This allows you to send data between your cloud servers using a private connection and without incurring any costs. With floating IPs, you get a static IP-address that you can attach to any one of our cloud servers. It can then be freely moved around, allowing to create a highly available infrastructure without a single point of failure.

(​IMG)

(​IMG)

 

ProximCloud: Deep Discounts on London Shared Hosting (20% Off Coupon Code!)

ProximCloud Logo

ProximCloud first started posting offers with us back in April 2020.  A year later, they’re still bringing our readers great hosting offers in London.  We last had an offer for them on May 14, 2021 and now they’re back with coupon codes!

  • Get 20% off a quarterly, semi-annual, annual, biennial or triennial service!
  • Or get 10% off monthly service!

And the prices are pretty respectable to start with a great host, so if London is where you want to be, read on for the deals.

Their WHOIS is public. Their Terms of Service is available on their web site. They accept PayPal.

Here’s a little about ProximCloud in their own words:

ProximCloud is a small website hosting business, which has been in operation for over three years (since 28th Feb 2018), which has striven based on the reliability and low-cost factors of our services. ProximCloud always puts the customer first, and has ensured to provide our customers with many support-methods to ensure they can reach us when they need it, and when it suits them.

If you decide to give ProximCloud a try, please tell others how it goes in the comments below.

Now read more to see the offers!

Coupon Codes

  • LEBNZ32 will provide all LEB browsers with 20% off a quarterly, semi-annual, annual, biennial or triennial service with ProximCloud, covering our Essential, Deluxe, Ultra or Unlimited package.

  • LEBNZ31 will provide all LEB browsers with 10% off a monthly service with ProximCloud covering our Deluxe, Ultra or Unlimited package.

Essential Package

  • 25GB SSD Storage
  • 250GB Monthly Bandwidth
  • Unlimited FTP Accounts
  • Unlimited Email Accounts
  • Unlimited MySQL Databases
  • Unlimited Subdomains
  • 10 Addon Domains
  • Automatic Daily Backups
  • FREE SSL Certificate
  • SSH Access
  • $1.50/mo BEFORE Coupon Code
  • (ORDER)

Deluxe

  • 50GB SSD Storage
  • Unmetered Monthly Bandwidth
  • Unlimited FTP Accounts
  • Unlimited Email Accounts
  • Unlimited MySQL Databases
  • Unlimited Subdomains
  • Unlimited Addon Domains
  • Automatic Daily Backups
  • FREE SSL Certificate
  • SSH Access
  • $2.99/mo BEFORE Coupon Code
  • (ORDER)

Ultra Package

  • 100GB SSD Storage
  • Unmetered Monthly Bandwidth
  • Unlimited FTP Accounts
  • Unlimited Email Accounts
  • Unlimited MySQL Databases
  • Unlimited Subdomains
  • Unlimited Addon Domains
  • Automatic Daily Backups
  • FREE SSL Certificate
  • SSH Access
  • $4.50/mo BEFORE Coupon Code
  • (ORDER)

NETWORK INFO:

  • We offer 20Gbps of DDoS protection on our shared servers.
  • Hosted in London, Maidenhead. Test IP is 185.221.216.1
  • Our Maidenhead datacenter is situated on a purpose built site near the centre of the town.
  • The Maidenhead datacenter provides a total capacity of 1300 sq. mt. of high quality, resilient and secure space across 4 data halls. The UK facility offers diverse fiber routing via multiple carriers, Cross Connection to a number of Tier 1 carriers and redundant core switches and routers.

HOST NODE INFO:

  • Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz
  • Ram: 32GB

Please let us know if you have any questions/comments and enjoy!

raindog308

I’m Andrew, techno polymath and long-time LowEndTalk community Moderator. My technical interests include all things Unix, perl, python, shell scripting, and relational database systems. I enjoy writing technical articles here on LowEndBox to help people get more out of their VPSes.

magento2 – Is there is a way to apply automatic coupon code in Magento 2 if total is greater than 1000?

I have a Magento 2.4 Store in which i want to auto apply coupon code when the total of the product is greater than 1000.

Like i don’t want to enter that in discount box
enter image description here

Like here i don’t want to enter here it will be auto apply when subtotal is greater than 1000.

Thanks