Prestashop 中的产品信息 [英] Product Information in Prestashop

查看:49
本文介绍了Prestashop 中的产品信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何通过产品ID获取产品信息并在prestashop中显示正确的价格?我尝试了自定义 SQL 查询,并且可以获得产品信息,但是我似乎无法显示正确的价格,因为 Prestashop 在不同的表中存储了不同的价格方案.前任.ps_product、ps_specific_price、ps_attribute_impact

Does anyone know how to get the product information by product ID and show the correct price in prestashop? I have tried a custom SQL query and I can get the product information, however I can't seem to show the correct price since Prestashop stores different price scenarios in separate tables. ex. ps_product, ps_specific_price, ps_attribute_impact

推荐答案

您可以使用 prestashop 类.

you can use the prestashop class.

$product = new Product($id_product,false,$lang_id);

现在您将拥有 $product 变量中的所有详细信息.如果你想采取任何你采取这样的变量.

now you will have all details in $product variable. if you want to take any variable you take like this.

$name = $product->name;

适用于 prestashop 1.5x

it is for prestashop 1.5x

这篇关于Prestashop 中的产品信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆