Skip to content

Conversation

@jswift
Copy link
Collaborator

@jswift jswift commented Jun 10, 2021

Due to the kinda annoying interface for add custom urls to categories, products, and brands I've add a helper that allows the following

$category = new Category();
$category->setCustomUrl('/my-slug');

$this->assertTrue($category->custom_url->is_customized);
$this->assertEquals('/my-slug', $category->custom_url->url);

@jswift jswift requested review from Zigr1 and aligent-skumar June 10, 2021 07:39
Copy link
Contributor

@aligent-skumar aligent-skumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom_url requires is_customized and url for brands, categories and products, assuming is_customized is supplied to the custom_url.

@jswift jswift merged commit 4be2786 into main Jun 11, 2021
@jswift jswift deleted the feature/add-custom-url-helper branch July 8, 2021 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants