Fonctions
updateViewed()
| nom | updateViewed() |
| paramètres | $product_id |
| usage | ? |
getProduct()
| nom | getProduct() |
| paramètres | $product_id |
| usage | permet de récupérer de nombreuses informations sur un produit à l'aide de son ID. |
| output | retourne un array contenant différents propriétés du produit : |
La fonction getProduct() récupère les contenus de plusieurs tables. Notamment l'intégralité de la table bdd product, à l'exception de la propriété shipping.
Les valeurs suivantes sont aussi récupérées :
getProducts()
| nom | getProducts() |
| paramètres | array $data |
| usage | Permet d'obtenir une liste de produits selon divers paramètres |
| output | retourne un array $product_data contenant une liste d'IDs produit : |
L'array $data peut contenir de nombreux paramètres différents.
| nom du paramètre | usage |
| filter_category_id | ID de catégory principale |
| filter_sub_category | ID de sous-catégorie |
| filter_filter | |
| filter_name | |
| filter_tag | |
| filter_description | |
| filter_manufacturer_id | |
| sort | |
| order | |
| start | |
| limit | |
getProductSpecials()
| nom | getProductSpecials() |
| paramètres | array $data |
| usage | ? prix spécial ? |
| output | ? |
getLatestProducts()
| nom | getLatestProducts() |
| paramètres | $limit |
| usage | ? produits les plus récents ? |
| output | ? |
getPopularProducts()
| nom | getPopularProducts() |
| paramètres | $limit |
| usage | ? produits les plus populaires ? |
| output | ? |
getBestSellerProducts()
| nom | getBestSellerProducts() |
| paramètres | $limit |
| usage | ? produits les plus vendus ? |
getProductAttributes()
| nom | getProductAttributes() |
| paramètres | $product_id |
| usage | permet d'obtenir les attributs d'un produit |
| output | $product_attribute_group_data |
Le tableau en sortie contient un tableau imbriqué :
n-0
| $product_attribute_data | |
| attribute_id | $product_attribute['attribute_id'] |
| name | $product_attribute['name'] |
| text | $product_attribute['text'] |
n-1
| $product_attribute_group_data | |
| attribute_group_id | $product_attribute_group['attribute_group_id'] |
| name | $product_attribute_group['name'] |
| attribute | $product_attribute_data |
getProductOptions()
| nom | getProductOptions() |
| paramètres | $product_id |
| usage | permet d'obtenir les options d'un produit |
| output | product_option_data |
Le tableau en sortie peut contenir un tableau imbriqué dans le cas ou l'option est de type select, radio, checkbox ou image :
n-0
| $product_option_data[] | |
| product_option_id | $product_option['product_option_id'] |
| option_id | $product_option['option_id'] |
| name | $product_option['name'] |
| type | $product_option['type'] |
| option_value | $product_option_value_data OU product_option['option_value'] |
| required | $product_option['required'] |
n-1
Si option est de type select, radio, checkbox ou image.
| $product_option_value_data[] | |
| product_option_id | $product_option['product_option_id'] |
| product_option_value_id | |
| option_value_id | |
| name | |
| image | |
| quantity | |
| subtract | |
| price | |
| price_prefix | |
| weight | |
| weight_prefix | |
autres fonctions à faire…