简体   繁体   English

Opencart查询数据库以获取产品的价格和属性

[英]Opencart Query the database to get price and attributes of products

Opencart Query the database to get price and attributes of products having same UPC Code. Opencart查询数据库以获取具有相同UPC代码的产品的价格和属性。 For example you are publishing products from several stores like amazon and ebay in your opencart and want to compare a product for price based on upc. 例如,您要在opencart中发布来自亚马逊和ebay等多家商店的产品,并希望根据upc比较产品的价格。

Therefore, I need to display products having same UPC code. 因此,我需要显示具有相同UPC代码的产品。

Can someone create a simple database query for me that I can put on product.tpl page on opencart to show the products price and attributes. 有人可以为我创建一个简单的数据库查询,然后将其放在opencart上的product.tpl页面上,以显示产品的价格和属性。 The query will take the upc from product detail page's upc code. 该查询将从产品详细信息页面的upc代码中获取upc。

Thanks, 谢谢,

You can use this query to extract products from table "products" with same upc code: 您可以使用此查询从具有相同upc代码的表“产品”中提取产品:

SELECT * FROM products AS pr
 JOIN products AS pr2 ON pr.upc_code = pr2.upc_code AND pr.id <> pr2.id

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM