Comments

mcurry’s picture

Assigned: mcurry » rfay
Status: Active » Needs review
StatusFileSize
new1.58 KB

Here's a patch that addresses all three issues.

For issue #1172106: Browse Info Panel needs to handle missing Browse Node Name fields:

The patch introduces a new variable named 'amazon_store_missing_browsenode_name_text' (as yet not configurable via any admin UI) that controls the text shown on browse nodes that do not have a name field or the name field is empty.

The default value is t('Unknown Category'). I'm open to suggestions for a better default, but for now that should be an improvement over an empty name. Adding this to the admin settings page will allow the site admin to customize it. If this patch is accepted and committed, I'll create a task to add an admin settings entry for this value.

The other issues are straightforward fixes.
#1167828: Amazon Browse widget navigation order is reversed : Reverse the string being built by prepending, rather than appending, the current Browse Node name.

#1167830: Panels Amazon Browse widget outputs extraneous separator at end of browse list : Don't output a separator if this is the first browse node in the ancestor tree (which is actually the last item we will output, since we are now building the string in reverse, per the fix for #1167828: Amazon Browse widget navigation order is reversed).

Update1

If you look at the patch, you'll see I took the liberty of changing double quotes (") to single quotes (') in string constants that didn't use variable substitution or escapes, since there's no need for double quotes there.

It's a code style thing, but I recall that it's more efficient to parse single-quoted strings since the PHP parser doesn't have to look for '$' tokens or a variety of escapes.

mcurry’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Assigned: rfay » mcurry
Status: Needs review » Patch (to be ported)

I've committed the patch. Marking as "to be ported" to 7.x.