获取可配置产品的自定义选项
如何在结账时获得可配置产品的自定义选项?对于简单产品,很简单:
foreach ($product->getOptions() as $option) {
echo $option->getTitle();
}
其中 $product 是一个简单产品。
但是,这不适用于可配置产品。
How do you get the custom options of configurable products on checkout? For simple products, it is easy as:
foreach ($product->getOptions() as $option) {
echo $option->getTitle();
}
where $product is a simple product.
However, this doesn’t work for configurable products.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this: