Last active
April 7, 2021 09:27
-
-
Save unlocomqx/424bea75315023e0e5747c7ad7b5ffe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$combination = new Combination($id_attribute); | |
$attributes = array(); | |
$attributes_str = ''; | |
if (Validate::isLoadedObject($combination)) { | |
$attributes_names = $combination->getAttributesName(Context::getContext()->language->id); | |
if (is_array($attributes_names)) { | |
foreach ($attributes_names as $attributes_name) { | |
$attributes[] = $attributes_name['name']; | |
} | |
} | |
$attributes_str = implode('-', $attributes); | |
} | |
$attribute = $id_product.'-'.$attributes_str; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment