productratings app help

17 views
Skip to first unread message

Darren Hollenbeck

unread,
Apr 5, 2012, 1:00:36 PM4/5/12
to satchm...@googlegroups.com
Trying to figure out some of the functionality with this app, specifically the sidebar_links plugin template:

{% if shop.options.SHOP.RATINGS.value %}{% load i18n %}
{% url satchmo_product_best_rated as besturl %}
{% if besturl %}<br/><a href="{{ besturl }}">{% trans "Most Popular" %}</a><br/>{% endif %}
{% endif %}

The link is not showing up even though I do have some products with ratings. If I edit the template to remove the outer-most if-block, it works fine.  What is shop.options.SHOP.RATINGS.value, where is it, and how can I check it's value (in a debug session?) and also how is it configured?

Thanks

Darren Hollenbeck

unread,
Apr 5, 2012, 5:33:28 PM4/5/12
to satchm...@googlegroups.com
Figured out some debugging in pdb and inspected shop.options.SHOP - turns out there is no RATINGS in there so it is not finding it and therefore giving false to the if test.

Next question - is this a bug, or a problem with my install/config?  I don't see a config_register() call for RATINGS anywhere, so my guess is it is an oversight, but... ??

hynekcer

unread,
Apr 5, 2012, 6:35:50 PM4/5/12
to Satchmo users
Chris and Darren,
do you think, that the sidebar link "Most Popular" can be enabled for
all people who have enabled app "satchmo_ext.productratings"?

I look in Satchmo prehitory. Both parts of broken condition
"shop.options" and "SHOP.RATINGS" that should enable it, have been
removed more than 3 years ago by code reorganization.

It can be probably disabled in http://localhost/admin/app_plugins/ but
I do not know currently how.

--Hy

Darren Hollenbeck

unread,
Apr 6, 2012, 11:47:16 AM4/6/12
to satchm...@googlegroups.com
I think it would be fine to have the sidebar link show by default - if someone wants to make it hidden in certain cases they could override that behavior themselves with a customization.

hynekcer

unread,
Apr 7, 2012, 5:58:47 PM4/7/12
to Satchmo users
Yes,
* both is logically related together
* it is easier to remove something than to reinvent it.
* it can be disabled by customizing templates or by adding a record by
web Admin to: App_Plugins / Plugin_Points:
Label: "sidebar_links", Status: Disabled.
(This is currently the only plugin in this plugin point, so it is
easy.)

--Hy
Reply all
Reply to author
Forward
0 new messages