Allow nullable variant id in Product Complex Rule Conditions#210
Allow nullable variant id in Product Complex Rule Conditions#210qadeersahmed wants to merge 11 commits intoaligent:mainfrom
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.
Is this to handle the case of BigCommerce not returning the adjuster property?
There was a problem hiding this comment.
Yes, this will handle when BigCommerce is not returning adjuster property.
There was a problem hiding this comment.
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.