BigCommerce模具-检索产品卡中的产品自定义字段 [英] BigCommerce Stencil - Retrieve Product Custom Fields in Product Card

查看:57
本文介绍了BigCommerce模具-检索产品卡中的产品自定义字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在BigCommerce模具中的类别列表页面上检索每种产品的custom_fields数据.该文档此处,以及下面的JSON产品表示,表明这是不可能的./p>

考虑到Blueprint中提供的功能,我很难相信该功能会被遗漏在Stencil中.

{
    "id": 691,
    "name": "Archipelago Botanicals - Pomegranate Lip Gloss",
    "url": "http://******.mybigcommerce.com/archipelago-botanicals-pomegranate-lip-gloss/",
    "brand": {
      "name": "Archipelago Botanicals"
    },
    "rating": 0,
    "availability": "",
    "summary": "Pomegranate lip gloss leaves lips hydrated, shiny and smooth. Apply liberally.Net Weight: 0.42 oz. / 12 g Mineral Oil, Polybutene, Octyidodecanol, Butylene, Ethylene, Styrene Copolymer, Ethylene, Propylene, Styrene Copolymer, C18-36 Acid Triglycerides, Fr",
    "image": {
      "data": "https://cdn3.bigcommerce.com/*****/images/stencil/{:size}/products/691/41439/arbopolipgl__77026.1464267682.jpg?c=2",
      "alt": "Archipelago Botanicals - Pomegranate Lip Gloss"
    },
    "date_added": "Apr 7th 2016",
    "qty_in_cart": 0,
    "pre_order": false,
    "has_options": false,
    "show_cart_action": false,
    "price": {
      "without_tax": {
        "formatted": "$5.00",
        "value": 5
      },
      "rrp_without_tax": {
        "formatted": "$12.50",
        "value": 12.5
      },
      "saved": {
        "formatted": "$7.50",
        "value": 7.5
      },
      "tax_label": "Tax"
    }
  },

我是否缺少某些东西,或者此功能目前在Stencil上不可用?

有没有人想出一个创造性的解决方案来检索每个产品卡中的数据?

谢谢

解决方案

product card现在允许公开此内容.它提供了与产品关联的所有自定义字段的数组.有关产品卡对象的信息,请此处.

这是必须在BC核心应用程序中进行的一项更改,此修复程序已于9月20日发布

I'm trying to retrieve each product's custom_fields data on the category list pages in BigCommerce Stencil. This documentation here, and the JSON product representation below, would suggest this is not possible.

It is hard for me to believe this functionality would be left out of Stencil, considering it was available in Blueprint.

{
    "id": 691,
    "name": "Archipelago Botanicals - Pomegranate Lip Gloss",
    "url": "http://******.mybigcommerce.com/archipelago-botanicals-pomegranate-lip-gloss/",
    "brand": {
      "name": "Archipelago Botanicals"
    },
    "rating": 0,
    "availability": "",
    "summary": "Pomegranate lip gloss leaves lips hydrated, shiny and smooth. Apply liberally.Net Weight: 0.42 oz. / 12 g Mineral Oil, Polybutene, Octyidodecanol, Butylene, Ethylene, Styrene Copolymer, Ethylene, Propylene, Styrene Copolymer, C18-36 Acid Triglycerides, Fr",
    "image": {
      "data": "https://cdn3.bigcommerce.com/*****/images/stencil/{:size}/products/691/41439/arbopolipgl__77026.1464267682.jpg?c=2",
      "alt": "Archipelago Botanicals - Pomegranate Lip Gloss"
    },
    "date_added": "Apr 7th 2016",
    "qty_in_cart": 0,
    "pre_order": false,
    "has_options": false,
    "show_cart_action": false,
    "price": {
      "without_tax": {
        "formatted": "$5.00",
        "value": 5
      },
      "rrp_without_tax": {
        "formatted": "$12.50",
        "value": 12.5
      },
      "saved": {
        "formatted": "$7.50",
        "value": 7.5
      },
      "tax_label": "Tax"
    }
  },

Am I missing something, or is this functionality not available on Stencil at this time?

Has anyone come up with a creative solution to retrieve this data inside each product card?

Thanks

解决方案

The product card now allows this to be exposed. It provides an array of all custom fields associated with a product. Information on the product card object is here.

It was a change that had to be made in the BC core app and the fix was released on Sept 20th

这篇关于BigCommerce模具-检索产品卡中的产品自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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