Products

Titel

Keine Änderungen

Permalink

Keine Änderungen

Inhalt

OldNew
48The TARIC code (Integrated Tariff of the European Communities) can be 48The TARIC code (Integrated Tariff of the European Communities) can be
49used to specify product type when it comes to shipping and toll. 49used to specify product type when it comes to shipping and toll.
50 50
51External Link: [TARIC](http://en.wikipedia.org/wiki/Taric_code) 51External Link: [TARIC](https://en.wikipedia.org/wiki/Taric_code)
52External Link: [European Comission](http://ec.europa.eu/taxation_customs/dds2/taric/taric_consultation.jsp?Lang=en&Screen=0&Expand=true) 52External Link: [European Comission](https://ec.europa.eu/taxation_customs/dds2/taric/taric_consultation.jsp?Lang=en&Screen=0&Expand=true)
53 53
54## Options 54## Options
55 55
71$product->data['name'] = ['en' => 'Yellow Duck']; 71$product->data['name'] = ['en' => 'Yellow Duck'];
72$product->data['prices'] = ['USD' => 9.99]; 72$product->data['prices'] = ['USD' => 9.99];
73$product->save(); 73$product->save();
74```
75
76## Reference Model
77
78```php
79echo reference::product($product_id)->name;
80echo reference::product($product_id)->default_category->name;
81echo reference::product($product_id)->manufacturer->name;
82```
83
84## Database Query
85
86```php
87$query = database::query(
88 "select p.id, pi.name, pp.`USD` as price from ". DB_TABLE_PREFIX ."products p
89 left join ". DB_TABLE_PREFIX ."products_info pi on (pi.product_id = p.id and pi.language_code = 'en')
90 left join ". DB_TABLE_PREFIX ."products_prices pp on (pp.product_id = p.id)
91 where p.id = ". (int)$product_id ."
92 limit 1;"
93);
94
95$product = database::fetch($query);
74```96```

Bearbeitet von %benutzer am %datum um %zeit

This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.