简体   繁体   English

在BigCommerce商店首页上显示类别

[英]Display categories on BigCommerce store homepage

I'm trying to get a custom homepage set up for a BigCommerce store. 我正在尝试为BigCommerce商店设置自定义首页。 The store has a handful of products, in two categories. 该商店有两类商品。 The customer wants the products from both categories displayed on the homepage of the store. 客户想要商店首页上显示的两种类别的产品。 Unfortunately BigCommerce only provides panels to display "New" or "Featured" products on the homepage. 不幸的是,BigCommerce仅提供面板在首页上显示“新”或“精选”产品。

Does anyone know how to create a custom panel to display the contents of a chosen category? 有谁知道如何创建一个自定义面板来显示所选类别的内容? I have the RSS links for the categories, I was hoping for something like this: 我有用于类别的RSS链接,希望有这样的东西:

<div class="Block Moveable Panel" id="HomePageCategories">
<h2>Category One</h2>
   <div class="BlockContent">
    <display the first six items from URL source="rss-url-category-1">
   </div>
  <h2>Category Two</h2>
   <div class="BlockContent">
   <display the first six items from URL source="rss-url-category-2">
   </div>
</div>

Anyone have any suggestions or hints to how to achieve this? 任何人都对如何实现这一目标有任何建议或提示?

I wound up just AJAXing in the contents of the respective content page's .ProductList ul's. 我只整理了各自内容页面的.ProductList ul的内容中的AJAXing。 Not ideal, but the best quick solution I found. 不理想,但是我找到的最好的快速解决方案。

I created a new panel called HomePageCategories.HTML and pasted the AJAX function in, like so: 我创建了一个名为HomePageCategories.HTML的新面板,并将AJAX函数粘贴到其中,如下所示:

<div class="Block Moveable Panel" id="HomePageCategories">
<h2>Category Title One</h2>
   <div class="BlockContent" id="magaziner"></div>
  <h2>Category Title Two</h2>
   <div class="BlockContent" id="buecher"></div>
</div>

<script type="text/javascript">

var ajax_load = "path_to_loading_gif";

var loadMagaziner = "/magaziner/";    
$("#magaziner").html(ajax_load).load(loadMagaziner + " .ProductList");  

var loadBuecher = "/buecher/";
$("#buecher").html(ajax_load).load(loadBuecher + " .ProductList");
 </script>

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

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