(10-01-2017, 05:15 AM)rjonesbsink Wrote: no help?
I'm still investigating, but it appears [so far] that the pricematrix is
only referenced/used with
SelectCreditItems.php,
SelectOrderItems_IntoCart.inc, and
StockDispatch.php. [based on a source-wide search, see image below]
The primary script is
PriceMatrix.php. The pricematrix table is referenced by another script named
includes/GetPrice.inc.
The
GetPrice.inc file defines a function called
GetPrice(), BUT although GetPrice.inc is included in several files, only the first three files that I mentioned at the beginning are the ones that actually have calls to the GetPrice() function. [as found in another source-wide search, see image below]
I'm not 100% certain why this is at the moment, but I did find a comment in some other files with:
Quote: /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where one price falls inside another effective date range except in the case of a blank end date - ie no end date - the default price for the currency/salestype.
I first thought that we would need to update the previous default price (blank end date), when a new default price is entered, to have an end date of the startdate of this new default price less 1 day - but this is converting a default price into a special price which could result in having two special prices over the same date range - best to leave it unchanged and use logic in the GetPrice.inc to ensure the correct default price is returned
*
* After further discussion (Ricard) if the new price has a blank end date - i.e. no end then the pre-existing price with no end date should be changed to have an end date just prior to the new default (no end date) price commencing
*/
...so there might be a reason, that I don't know, why the matrix is not referenced in the other files that have
GetPrice.inc included, but
NO calls to the
GetPrice() function? The other files that have included GetPrice.inc, without the GetPrice() function, are querying the prices table instead, or have
no price-related queries.
For others that might also look into this matter...
Here's the file references to
pricematrix:
...and the file references to
GetPrice:
So, all that being said, I would need the perspective of someone closer to the
pricematrix history/use that can elaborate more into this matter.