-
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product class #6370
Product class #6370
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
8161212
to
ca4a636
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Despite this PR touching a lot of files, I think it certainly improves the consistency across the many places where product data is rendered, instead of the sometimes wildly different ways of outputting things. Ready for deeper review IMO. Of course, if something needs refining let's discuss it and polish things. |
i am currently building a new site that makes use of this unreleased PR. which is how i found the error from 4/24 involving the admin and language. i just noticed a new warning today. that comes from here: zencart/includes/classes/Product.php Line 37 in 72db492
i think following that code should be something like: if (empty($this->data)) {
$this->EOF = true;
} the error gets triggered by something like: zen_get_products_type(66699585); where i am a BIG fan of this PR as i agree that it improves consistency and makes developers lives easier; at least those developers that employ modifications to a product object. |
Yes, you're right. Good catch. Thanks. I should probably actually go refactor all those legacy functions to no longer use the legacy fallbacks ... cuz there's no point depending on them. And one can go back to the PR/commit to see what the code was "before" the refactoring if they wanna see how to implement the changes in their own code. |
I'm opting for: |
f2ca165
to
1afa3c7
Compare
I did some refactoring to functions_products.php and shopping_cart.php class, to avoid using the deprecated syntax that relied on queryFactory results that were used before centralizing these queries into the Product class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use existing notification for downward compatibility.
df825a8
to
2081c67
Compare
Centralizes all basic product-related querying and overriding. (Not including attributes or pricing.) Closes zencart#6367 The easiest override/notifier hook is now `NOTIFY_GET_PRODUCT_OBJECT_DETAILS`
The merge of #6473 means this PR must go into 2.1.0. Changing label. |
Fixes zencart#6529 Caused by zencart#6370
Centralizes all basic product-related querying and overriding. (Not including attributes or pricing.)
Closes #6367
The easiest override/notifier hook is now
NOTIFY_GET_PRODUCT_OBJECT_DETAILS