-
Notifications
You must be signed in to change notification settings - Fork 23
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
Allow nullable variant id in Product Complex Rule Conditions #210
base: main
Are you sure you want to change the base?
Conversation
Allow null values for variant id in complex rule condition.
Complex Rule Condition Null Variant ID
Incorporate Null Adjuster from API for FIXED adjuster value.
Fix for Null adjuster value from API for FIXED type.
Incorporate Null Adjuster from API for FIXED adjuster value.
Fix for Null adjuster value from API for FIXED type.
Allow usage of optionObject when overriding functions.
Allow usage of optionObject when overriding functions.
Using class constants.
Using Class Constants
{ | ||
if (!is_null($this->optionObject)) { | ||
if(is_null($this->optionObject->adjuster)){ | ||
$this->optionObject->adjuster = self::ADJUSTER_FIXED; |
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.
Is this to handle the case of BigCommerce not returning the adjuster
property?
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.
Yes, this will handle when BigCommerce is not returning adjuster property.
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.
It is usally not returning adjuster property when in store front we have fixed type of adjuster.
Thank you for this! It seems there are two different changes included here, the bug fix for variantid, and a change to add a default value for the adjusters. I've created a pull request for a simpler way to set the default value here: https://github.com/aligent/bigcommerce-v3-api-php-client/pull/211/files, does that meet your requirements? Would you be able to do the pull request to be only the bug fix? |
Variant ID is also sometimes not assigned in the store for conditions in complex rules. This is not allowing to incorporate those cases. |
Allow null values for variant id in complex rule condition.
The variant_id in complex rules conditions is not array but the integer as per documentation.