Closed kmgdevelopment closed 8 years ago
@kgrote hmm, I'm able to get this to work without any problems by using this code in my .dugway.json file:
{
"store": {
"subdomain": "nickswoodshop"
},
"customization": {
"products_per_page": 4
}
}
You might need to make sure that your Products page has the correct code to use the theme setting - here's one example:
{% paginate products from products.current by theme.products_per_page %}
{% if products != blank %}
<ul class="products">
{% for product in products %}
<li class="{{ product.css_class }}">
<a href="{{ product.url }}">
<img alt="Image of {{ product.name | escape }}" src="{{ product.image | product_image_url }}">
<h4>{{ product.name }}</h4>
</a>
</li>
{% endfor %}
</ul>
{{ paginate | default_pagination }}
{% else %}
<p>No products found.</p>
{% endif %}
{% endpaginate %}
Yup, you're right. My product logic wasn't correct. It was working on the production site though, so it was confusing. Thanks.
I'm trying to set the products per page setting, but it doesn't seem to be working. My products template in dugway just shows all the products at once. I put this in my
.dugway.json
file:And restarted dugway server, but nothing. I also tried:
The weird thing is the default setting in
settings.json
is also 9, so I don't see why it's outputting wrong.