Единственный способ, который я могу придумать, — это получить продукты, а затем в сценарии вызвать другие API для получения необходимой мне информации, прежде чем окончательно вернуть ответ.
Я все еще новичок в Magento, и мне кажется, что это сильно влияет на производительность. Эффективно ли приведенное выше решение с точки зрения производительности или есть лучший способ получения тегов и т. д. из API rest/products?
По сути, то, что я поиск — это что-то вроде этого:
Текущий API возвращает:
{
337: {
entity_id: "337"
type_id: "simple"
sku: "ace000"
color: "15"
gender: "93"
material: "130"
jewelry_type: null
description: "Gunmetal frame with crystal gradient polycarbonate lenses in grey. "
meta_keyword: null
short_description: "A timeless accessory staple, the unmistakable teardrop lenses of our Aviator sunglasses appeal to everyone from suits to rock stars to citizens of the world."
name: "Aviator Sunglasses"
meta_title: null
meta_description: null
regular_price_with_tax: 319.34
regular_price_without_tax: 295
final_price_with_tax: 319.34
final_price_without_tax: 295
is_saleable: true
image_url: "http://magentogs.cloudapp.net/magento/m ... 000a_1.jpg"
}
}
Я хочу добавить следующее (в качестве примера): ** включить то, что я хочу добавить.
{
337: {
entity_id: "337"
type_id: "simple"
sku: "ace000"
color: "15"
gender: "93"
material: "130"
jewelry_type: null
description: "Gunmetal frame with crystal gradient polycarbonate lenses in grey. "
meta_keyword: null
short_description: "A timeless accessory staple, the unmistakable teardrop lenses of our Aviator sunglasses appeal to everyone from suits to rock stars to citizens of the world."
name: "Aviator Sunglasses"
meta_title: null
meta_description: null
regular_price_with_tax: 319.34
regular_price_without_tax: 295
final_price_with_tax: 319.34
final_price_without_tax: 295
is_saleable: true
image_url: "http://magentogs.cloudapp.net/magento/m ... 000a_1.jpg"
**tags: [tag1,tag2,tag3]**
**categories: [category1,category2,category3]**
}
}
Подробнее здесь: https://stackoverflow.com/questions/286 ... -to-retrie
Какова производительность расширения API rest/products в Magento для получения тегов и атрибутов продуктов в возвращаемо ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Создайте новый API-интерфейс Magento Rest, чтобы получить список категорий в Magento.
Anonymous » » в форуме Php - 0 Ответы
- 41 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Symfony2 — Настройка облака тегов с использованием веса тегов для популярных тегов
Anonymous » » в форуме Php - 0 Ответы
- 82 Просмотры
-
Последнее сообщение Anonymous
-