Please note: The code on this page is submitted by members of the FoxyCart community, and may not verified by FoxyCart.com LLC in any way, shape, or form. Please double check the code before installing. If you need help with it please post in our forum, but if we cannot offer assistance (due to unfamiliarity with this particular system or language) we apologize in advance.
HiFi is a ground-breaking content management platform. Design beautiful websites with web standards and zero design constraints.
Assumptions:
Field Type: Text Field Label: Price
Remember, you can add as many variables as you would like (ie: code, color, size)
<!--EXTEND YOUR TEMPLATE FILE--> {% extends "inside.html" %} <!--ADD CONTENT TO SPECIFIED BLOCK--> {% block main %} <ul> {% for post in items %} <li> <a href="{{ post.url }}" title="{{ post.title }}"> <img src="{{ post.media[0].url|imagesize({ width:200, height:200, crop:true }) }}" alt="{{ post.title }}"> <div>{{ post.title }}</div> </a> </li> {% endfor %} </ul> {% endblock main %}
This creates an unordered list of products by displaying product image and product name. Each product is linked to product detail page.
<!--EXTEND YOUR TEMPLATE FILE--> {% extends "detail.html" %} <!--ADD CONTENT TO SPECIFIED BLOCK--> {% block main %} <!--PRODUCT IMAGE--> <img class="product_image" src="{{ this.media[0].url|imagesize({ width:190, height:190, crop:true }) }}" alt="{{ this.title }}"> <!--PRODUCT NAME--> <h1 class="product_name">{{ this.title }}</h1> <!--PRODUCT PRICE--> <div class="product_price">${{ this.custom.product_settings.price }}</div> <!--PRODUCT CONTENT--> <div class="product_detail">{{ this.content }}</div> <!--ADD TO CART LINK--> <a href="https://YOURSTORE.foxycart.com/cart?name={{ this.title }}&price={{ this.custom.product_settings.price }}&category={% for cat in hifi.get({type: 'category', count: 1, orderBy: 'title'}) %}{{ cat.title }}{% endfor %}">Add To Cart</a> {% endblock main %}