oc-shopaholic / oc-bootstrap-shopaholic-theme

🅱️ Free basic theme based on Bootstrap 4 framework
GNU General Public License v3.0
22 stars 12 forks source link

Product page gives 404 #32

Closed briddle closed 5 years ago

briddle commented 5 years ago

When I:

The shopaholic theme creates links to the product page: women/default/demo

This results in a 404 for me...

P.S. The URL field for the page "Product page" is different from that in the docs. In the theme it is: _/:maincategory/:category/:slug

This results in a 404 for me...

kharanenka commented 5 years ago

Bootstrap theme provides an example of 2-level catalog. You can change URL for your project. If your catalog has one level, then you can change URL of product page and remove component from product page. For example:

title = "Product page"
url = "/:category/:slug"
layout = "main"
is_hidden = 0

[CategoryPage]
slug = "{{ :category }}"
slug_required = 1
smart_url_check = 0

[ProductPage]
slug = "{{ :slug }}"
slug_required = 1
smart_url_check = 1
==
{% set obProduct = ProductPage.get() %}
{% set obCategory = CategoryPage.get() %}