Problem/Motivation
Let's suppose you wish to to get absolute URL to a product variation, according to documentation, you should be able to do this:
$dataProduct->toUrl('canonical', ['absolute' => TRUE])->toString();
But it won't work because ProductVariation::toUrl() method overrides the $options passed in parameter.
Little a 1 character patch is necessary. I will attach it !
Proposed resolution
Merge passed $options and default built options in the toUrl().
Remaining tasks
- patch
- review
User interface changes
- none
API changes
- none, since it should work as per documentation.
Data model changes
- none
Comment | File | Size | Author |
---|---|---|---|
#2 | productvariation_tourl_overrides_options--3015767-2.patch | 551 bytes | Dom. |
|
Comments
Comment #2
Dom. CreditAttribution: Dom. as a volunteer and commentedPatch attached
One character patch literally ;)
Comment #4
bojanz CreditAttribution: bojanz at Centarro commentedSometimes one character makes a difference :)
Thanks!