Bigcommerce stencil suggested cart content - bigcommerce

I can't figure out how to show suggested products on the cart page of a Bigcommerce Stencil theme. I'm following the documentation, but it doesn't seem to be working. How do I do this correctly?
Currently, at the top of my templates/pages/cart.html file, I have the following front-matter:
---
suggested_products:
limit: 10
---
Then, in the body of the same file, I am trying to print the suggested product data to see if it's working. The docs mention 2 attributes that seem to be identical, so I'm trying both because I don't know which is correct or if there is a difference. Either way, neither is working:
{{json cart.suggested_products}}
{{json cart.suggestive_content}}
Both of the statements print nothing. There should be suggested data because I added a product to cart and the url is:
http://localhost:3000/cart.php?suggest=573b3237853f4
What is the correct way to retrieve this content?

This is currently a bug that you should see resolved within the next 48 hours. It is labeled under MERC-722. The Stencil documentation is also being revised.

Related

Outputting Shopify product metafields as HTML

I'm working on a custom code block for the Tapcart app version of my e-commerce site on Shopify. They have the ability to add HTML, CSS and/or JS in a custom code block.
However, I cannot get the html to output the custom fragrance notes (my custom metafield) for the product. Matter of fact, I can't get anything to output- it's just blank.
Thoughts? Appreciate your help!
{{product.metafields.custom.fragrance_notes}}
I tried {{product.metafields.custom.fragrance_notes}} expecting it to output the plain text multi-line of each individual product's fragrance notes (which I have as a custom metafield for each product) but instead nothing displays at all.
When asking for metafield data you can often meet with success by asking for the value stored at that key.
{{product.metafields.custom.fragrance_notes.value}}
Since the namespace is custom, the key is fragrence_notes and what you want to use or display is the value. So it is a key:value thing.
Of course, if your metafield is empty, you won't see anything no matter what.

Accessing settings json file in shopify from JS or product liquid page

I check this and it wasn't the same as my question:
Editing JSON data from within a shopify liquid page
Currently I have a file settings_data.json in my theme. This file has a specific field called "product_form_style" there is a specific field I need to edit here from one product template titled: product_custom_liquid
According to some scarce resource I read this would work:
{% settings.product_form_style == 'my value' %}
This however gives an error: "Liquid syntax error: Unknown tag 'settings'"
The official documentation says I can access it with ajax or jquery from js however it doesn't give any examples. It only says it can be done but I have no idea how.
The basic idea is if product template is 'product_custom' then change settings product_form_style == true.
Obviously the above is not correct syntax. Just an example.
You can't modify the settings_data.json from the front-end without using an APP.
If you could modify it without any authentication this would have been a huge security issue and anyone could modify it.
settings_data.json is modified only when you save something in your Customize panel. For any other way you will need a Private app or some App to do so.
In addition you can't modify files in any way from the liquid code as well. The liquid template language only outputs data, it can't modify that data without the use of some kind of an APP.

How to enable faceted search in BigCommerce using Stencil

So I've got an enterprise store and I'm building a stencil template, and I've run into a roadblock with the product filters...
How do I show more than 15 items in the product filters? I've tried removing the {{#if show_more_toggle}} code from components/faceted-search/facets/multi.html, but all that does is make the Show More label appear; it doesn't actually do anything when clicked.
Either I'm missing something significant, or Stencil doesn't yet support showing more than 15 filters. Either way, a pointer in the right direction would be appreciated.
This feature has been extended in blueprint themes, but Stencil is still limited to 15 items. This will be raised with the Stencil Project Manager.

Bigcommerce Stencil Recently Viewed Items

I am trying to display recently viewed items in a Stencil theme, but am not able to get the data on the page. I am calling the following Front Matter attribute marked as global (available on all pages) here.
Stencil Docs example
recently_viewed: null Boolean indicating whether to display recently viewed products. No filtering available.
https://stencil.bigcommerce.com/docs/front-matter-variables
recently_viewed: true
When I inspect the JSON on the page by appending '/?debug=context' to my URL, there is no data containing recently viewed items.
Has anyone else successfully displayed recently viewed items on a page in stencil?
Thanks.
This feature is currently only working for logged in customers. If you are seeing this behave abnormally from that, please let us know. It does not have feature parity with Blueprint themes' sideproductrecentlyviewed.

BigCommerce: How can I customize CategoryProductListing

I'm trying to customize a product in the CategoryContent panel in BigCommerce. I want to change the markup for each product in the listing, but the markup for the entire product list is trapped in an uneditable blob :%%GLOBAL_CategoryProductListing%% (I'm getting really tired of these unchangable GLOBAL variables).
Is there any way around this so that I can put my own markup on each product in the list. I'm also open, reluctantly, to reconstruct the product list using the API, but I'm not sure how I can access the API from within a BigCommerce store. Is that possible?
I was able to identify Snippets/CategoryProductsItem.html as the file containing the markup for the individual items in a category list.
I hope this saves someone the time it took me to find the file.
The Snippets/CategoryProductsItem.html is the snippet used for grid category files. If you are using the list view, the file is Snippets/CategoryProductsItemList.html.
This file represents each product listing li. It acts as a template which loops through all the %%GLOBAL_CategoryProductListing%% information for this category. To add a feature to the category ProductList li add it to the Snippet, and it will be applied to each item.
Hope this helps.