
⚡ valuein/shop:2021-06-25-15-05 → 2 🎉 → 2 🚀 → 1 🐛
- 🎉 Added Matrix config feature
- 🎉 Added Html snippets feature
- 🚀 Improved quote system
- 🚀 Improved tier pricing
- 🐛 Fixed group creation and deletion
🎉 New features
Added Matrix config feature
Summary:
Allow the developers to quickly/easily craete configurations lists without creating a complex entity and admin.
This will then allow the admin to configure some part of the logic flow without updating the code.
This feature aim to put a solution between hardcoding lists and creating a complex entity.
This doesn't plan to replace a full entity and will not provide much more function than a matrix of text fields.
To avoid as much as possible errors, the matrix structure is defined in a configuration file and symfony constraint are available to validate the fields.
The columns system name is defined by code
The matrix system name is defined by code
Test Plan:
- Install a custom bundle with matrix configuration (see fixtures test bundle for example)
- Go to the admin, config, matrix
- Open the matrix defined in the file
- Add rows
- Using the cli, use «matrix:open» or «matrix:*» to check the content of the matrix
Reviewers: vivien
Differential Revision: https://fab.valuein.fr/D12
Added Html snippets feature
Summary:
Add new functionality to add some snippet code on admin panel
Test Plan:
- Go to the admin
- Create a HtmlSnippet block
- Add Javascript code and save
- Go to shop
- Check that code displayed within source code
Reviewers: vivien, julien
Differential Revision: https://fab.valuein.fr/D7
🚀 Improvements
Improved quote system
Summary :
Refactor the quote system in order to be used without an invoce engine running.
Main features are :
- Refactored the whole Cart as a unique symfony form
- Added address management on the quote cart view
- Added payement method handling on quote cart view
Features that are NOT YET available :
- Quote approbation system
- Amendments
Test Plan:
- Run symfony command bin/console app:quote:generateUrl -u <your_shop_url> -c <your-customer-care-user@email_address> ;
- Open the link returned from the command output ;
- You should be logged-in on your shop as a customer care user (check the colored icon on the top-right navbar) ;
- Add a product to your cart ;
- Play with the data of the cart (quantities, addresses, payement methods, etc.) ;
- Refresh the cart and/or save the quote (mind the ID displayed in the top right corner of the quote main informations form) ;
- You can open a previously saved quote by run command bin/console app:quote:generateUrl -u <your_shop_url> --quoteId <your_quote_id> ;
- Open the link returned from the command output ;
- The previously saved quote should be displayed in the same state ;
Reviewers: julien.tattevin
Differential Revision: https://fab.valuein.fr/D13
Improved tier pricing
Summary :
Previously, the tier pricing calculation was using range to loop over every item and calculate this item price and do the sum.
It was flawed for float quantity and also used a lot of memory if the tier were big (we generated something like 10M long array).
This calculation count how many units are present in each tier of the pricing, and calculate the price for each tier.
The start of the range, is always the one defined in zuora.
The end of the range is the one defined in zuora or the quantity if the range is not closed. A max is added here to avoid that the end is before the start.
The amount of unit is found by removing the start offset of the range from the quantity. If this amount is bigger than the amount of unit in the range, it is truncated.
We then add to the total price, the value of this tier.
For exemple, for the range 0->100, 101->NULL with quantity 150,
First tier:
Start = 1
End = 100
NbUnitTotal = 100 - 1 + 1 = 100
NbUnit = quantity-start = 150 - 1 + 1 = 150, but as 150 is bigger than the amount of unit (100) we keep 100.
Second tier :
Start = 101
End = NULL, defaulted then to 150
NbUnitTotal = 150 - 101 + 1 = 50
NbUnit = quantity-start = 150 - 101 + 1 = 50, 50 isn't bigger than the amount of unit (50) so we keep 50.
Test Plan:
Create a tier pricing product with a tier going at least to 10M
Associate the product to a product in zkeys
Try open the product in the front
The memory usage should remaing low and the price should be calculated
Reviewers: vivien
Differential Revision: https://fab.valuein.fr/D9
🐛 Bug fixes
Fixed group creation and deletion
Summary:
When creating a group, an error 500 was thrown specifying that the tab wasn't correctly opened.
This fix resolve this issue and put the media field back in place.
This fix also resolve an issue when batch deleting groups
Test Plan:
Go to the admin page, products and group, group.
Try create a group. The form should open as expected with title, parent, image, rateplan and attributes filter.
Reviewers: vivien
Differential Revision: https://fab.valuein.fr/D8
- Projects
- None
- Subscribers
- None