Commercial lead prices #33
Reference in New Issue
Block a user
Delete Branch "commercial-lead-prices"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement support for commercial leads to set extra prices on package
NOTE: This PR must wait on https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/32 to be merged
Also note: Since logic for this is not fully completed there are few places with that will be changed during implementation
of linking customers to commercial leads and commercial leads catalogue. For now it is very simplified where every
customer belongs to every commercial lead and there is only default catalogue for commercial leads.
Execute
composer installandcomposer update-dbSmoke test:
Login to backend interface as admin
Create new package bundle (set country and prices)
Create new organization and give it role of Commercial Lead
Create new user and assign him to new organization
Login on frontend as customer (different organization than commercial lead)
Validate that new commercial lead is visible in commercial lead dropdowns
Validate that new package is not visible in coMarket
Login as new commercial lead to backend
Go to
ProductstabFind newly created package and click on it
Validate that page for setting extra prices is loaded and displayed default price values are the same
that are set with administrator.
Validate that customers tab is disabled
Set extra prices and Save changes
Validate that after refresh prices displayed are correct and that customers tab is enabled
Go to frontend
Select newly created commercial lead
Validate that package is retrieved
Open package and validate that prices are the same as calculated final customer prices
on page where commercial lead edited extra prices
Go back to commercial lead backend and open extra prices editor for package
Go to Customers tab
Find customer organization in dropdown and add new prices for him
Save changes
Validate changes are correctly saved after refresh
Go back to frontend intergace
Validate that package displays new prices (those that are specific only for his organization)
Order page
Check that prices in cart are prices specific for customer organization
Complete checkout process for package and create order
Validate that order prices are prices specific for customer organization
unmarked as a Work In Progress
changed the description
added 1 commit
a830a47d- retrieve all commercial leads on requestCompare with previous version
changed the description
assigned to @nedimu
added 28 commits
mastere810dd08- Merge branch 'master' into commercial-lead-pricesf14d35b1- Fix testsCompare with previous version
added 1 commit
b7ac53d1- use only customer specific prices if setCompare with previous version
changed the description
added 1 commit
d7103df6- add view admin dashboard to clCompare with previous version
added 1 commit
2d7b6c55- add view admin dashboard to clCompare with previous version
added 1 commit
dc1a1c64- Add default rolesCompare with previous version
added 1 commit
554dc37a- updated timestamp of role related db updates so they get triggered againCompare with previous version
This class's access is marked as private. That means it is not intended for use by plugin and theme developers as it is subject to change without warning in any future WordPress release. If you would still like to make use of the class, you should make a copy to use and distribute with your own project, or else use it at your own risk.
https://codex.wordpress.org/Class_Reference/WP_List_Table
Just a warning, it is up to you to decide should this stay this way
What is this function for ? If it is reaaly supposed to return empmty array, than a propriet comment would be good
Please put javascript code in seperate javascript file in assets dir (you can use same project structure fot this folder as we are using in wiaas plugin For example this file coud be in /assets/js/admin/admin-cl/. We want our JS code in one place, so it is more managable.
Just interested, any reason why interest rate is hardcoded to 0.58 ??
In logic for calculating price on legacy there is only one interest rate and it is of this value, so I set it as a constant since it does not changes anywhere. Maybe later this will be changed.
changed this line in version 10 of the diff
changed this line in version 10 of the diff
added 1 commit
ddf7d445- Refactor admin cl interface and handle product access with groupsCompare with previous version
It was supposed to override default actions for table.
I was aware of this fact when rendering them with help of this class, since it was really unlikely that they are going to change that class soon and if they do it could be copied as our own copy.
I did not want to implement different UI for product list for different roles so I used that class.
Since then I reviewed some hooks and filters in woocommerce and default wp hooks and figure out how to get the same display with them.
So I will remove this class and used default table which will be customized with hooks and filters.
Also because of it automatic access management for products based on role is also implemented.
merged
mentioned in commit
ecde654ae9