Comments (2)
Hi @CWFranklin If the discount is site wide and applies to any product could you not just get the discount from the database?
If the discount is for specific products, couldn't you just get all discounts that are restricted to that product?
from lunar.
Hey Alec. Yeah, getting it from the database was one of my considered options. While I figured it was unlikely that it would change, I was hoping to avoid duplicating the percentage discount logic. Much like the apply code checks against cart lines, I thought an applyToPurchasable function could check criteria against products. The extended code around the percentage calculations also check against customer group, etc.
from lunar.
Related Issues (20)
- Document and tidy additional packages
- Change database state management to upgrade command
- Move Stripe addon into monorepo
- Update tests to use PHP 8.3 HOT 2
- Tidy the "base" folder in the core package
- Update table rate shipping package to add Filament screens
- Create a new customer in admin panel HOT 1
- Checkout
- Storefront API
- Inventory
- Review Role permissions and ability to customise
- Reintroduce the installation command for the admin panel HOT 1
- Workflows
- Returns Management
- Disable variant creation option
- Ability to update User's email and password
- Reports
- When a product does not have a translated name in the current language, there is no link to click on in the products table. HOT 1
- New vs Returning Customer on Order listings
- Support Postgres in Scout searching
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lunar.