specifying wpec's breadcrumb/permalink category hierarchy

337 views
Skip to first unread message

Enzo

unread,
Nov 23, 2011, 7:11:15 AM11/23/11
to WordPress e-Commerce Plugin Development
Greetings,

I was referred to you for help by Michael Visser (www.visser.com.au)
after the following correspondence:

--start--

[01:19:48 PM] Enzo: quick question: is there a way to choose which
product category WPEC uses for breadcrumbs/permalinks?
[01:20:22 PM] Enzo: atm it seems to grab the first (e.g. in wpsc-
functions.php product_categories[0]->slug), which varies depending on
the product
[01:20:35 PM] Enzo: i need it to be from the same category
hierarchy across all the products

[01:21:50 PM] Michael Visser: that's been a beef I've had with
wpec too
[01:22:03 PM] Michael Visser: what line are you looking at within
wpsc-functions.php?

[01:22:39 PM] Enzo: between lines 1099 and 1177 seems to be the
relevant code
[01:22:49 PM] Enzo: but my php is iffy at best
[01:23:16 PM] Enzo: 1083 onward even
[01:23:22 PM] Enzo: wpsc_product_link()
[01:24:39 PM | Edited 01:24:51 PM] Enzo: the site is for selling
wine, so i'd like the structure to read like site.com/product_page/
producer_name/product_page

[01:25:36 PM] Michael Visser: sounds doable

[01:25:38 PM] Enzo: in fact, producer_name is a child category to
'producer', which i don't actually reference directly in any of the
products

[01:25:58 PM] Michael Visser: reading over the code, if you assign
a product to a single category then you've got no problems
[01:26:32 PM] Michael Visser: looks messy, and there's no way to
override it

[01:26:34 PM] Enzo: see, that's the problem - i'm using multiple
categories and reserving tags for something specific

[01:26:48 PM] Michael Visser: yup.
[01:27:08 PM] Michael Visser: thinking of a way around it...
[01:27:49 PM] Michael Visser: there's no easy way, they're always
going to have ugly/wrong category permalinks
[01:27:59 PM] Michael Visser: as it's locking the product to the
first category

[01:28:00 PM] Enzo: a while back i found a plugin that does
exactly what i'm looking for: http://wordpress.org/extend/plugins/hikari-category-permalink/
< the only problem is its functionality doesn't extend to custom post
types (like WPEC's)

[01:28:10 PM] Michael Visser: I guess you could throw in a check
there that says:
[01:28:31 PM] Michael Visser: if you have more than category then
use the current categories slug

[01:28:32 PM] Enzo: (plus i'm not sure if hikari would also
override the breadcrumbs)
[01:30:43 PM] Enzo: i tried to think of a solution earlier:

$parent_cat = 17; // Producers
foreach ( $product_categories as $product_category ) {
if ( $product_category->category_parent == $parent_cat ) {
$link = $childcat->cat_name;
}}
$product_category = $link;

[01:31:02 PM] Enzo: except i don't think category_parent actually
grabs that value and $childcat remains tricky to define

[01:31:05 PM] Michael Visser: same as what I was thinking

[01:31:56 PM] Enzo: i also toyed with a while loop but it got
ugly, usually returning nothing
[01:32:41 PM] Enzo: in category.functions.php there's
wpsc_get_term_parents() which is also interesting
[01:32:57 PM] Enzo: (\wpsc-includes\)

[01:45:32 PM] Michael Visser: raise it with the wpsc-dev list
[01:45:42 PM] Michael Visser: they might be able to hack a patch
for you

[01:46:06 PM] Enzo: can do - link?
[01:46:17 PM] Enzo: getshopped.org/..?

[01:47:14 PM] Michael Visser: wordpress-e-commerce-
plu...@googlegroups.com

[01:47:26 PM] Enzo: good one, thanks


---end---

That pretty much sums it up; any assistance would be much appreciated.

Kind regards,
- Lorenzo

Dan Milward

unread,
Nov 23, 2011, 3:24:33 PM11/23/11
to wordpress-e-c...@googlegroups.com
I'm not reading that. If either Enzo or Visser wants to summarize :P

d

Zao Web Design, LLC

unread,
Nov 23, 2011, 3:29:23 PM11/23/11
to wordpress-e-c...@googlegroups.com
If I'm understanding correctly, it seems that we could probably find an elegant enough solution for this - either by attaching priority meta to the categories, or by choosing the highest menu order category.  With either approach, you could specify category priority (either by ordering it higher on the category page, or setting priority in meta), and the [0] index key would be based on that, rather than on which one was selected first on the product.

Thoughts?

Thanks,

M. Justin Sainton
Zao Web Design, LLC
Principal / Project Manager
http://www.zaowebdesign.com
(c) 971.222.6330
(f) 1.413.723.0396



--
You received this message because you are subscribed to the Google Groups "WordPress e-Commerce Plugin Development" group.
To post to this group, send email to wordpress-e-commerce-plugin@googlegroups.com.
To unsubscribe from this group, send email to wordpress-e-commerce-plugin+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wordpress-e-commerce-plugin?hl=en.


benjaminhuson

unread,
Nov 23, 2011, 3:51:57 PM11/23/11
to wordpress-e-c...@googlegroups.com, wordpress-e-c...@googlegroups.com
It should be fairly easy to hook into the product link filter to change to URL so we would just need a way in the admin to set the priority of categories to be used.

My preference would be to use the highest category in the hierarchy that you can order. More complex ordering could be created as a plugin (eg extra priority fields for categories - people may even want to control this at a product level?)

I've hooked into the product link function before to ensure if a product is in multiple categories, it ignores a 'featured' category to make sure the link does not use that to create the URL.

Ben
To post to this group, send email to wordpress-e-c...@googlegroups.com.
To unsubscribe from this group, send email to wordpress-e-commerc...@googlegroups.com.

Michael Visser

unread,
Nov 23, 2011, 9:42:47 PM11/23/11
to wordpress-e-c...@googlegroups.com
Hi Dan,

Control over Category link names for Product Permalinks, e.g.

http://www.domain.com/products-page/[[[category]]]/product-name/

Where a Product belongs to multiple Categories then the first Category off the stack is used as the Category link, without any ordering or priority rules available. Some control over this would avoid confusion over Product Permalinks.

Cheers,


Michael Visser | Visser Labs
http://www.visser.com.au

This email is confidential and may also be privileged. If you are not the intended recipient, please notify me immediately by using my e-mail address above. You should not copy it or use it for any other purpose, nor disclose its contents to any other person. In messages of non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect the views and opinions of Visser Labs.

d

--


You received this message because you are subscribed to the Google Groups "WordPress e-Commerce Plugin Development" group.
To post to this group, send email to wordpress-e-c...@googlegroups.com.
To unsubscribe from this group, send email to wordpress-e-commerc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wordpress-e-commerce-plugin?hl=en.


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1873 / Virus Database: 2101/4635 - Release Date: 11/23/11

Enzo

unread,
Nov 24, 2011, 3:38:43 AM11/24/11
to WordPress e-Commerce Plugin Development
Hi - assigning category priority sounds like an elegant workaround.
What would be the simplest way to do this? I would prefer not to mess
with the database directly, if possible. I came across
wp_list_categories (http://codex.wordpress.org/Template_Tags/
wp_list_categories), which seems to offer the option to sort
categories according to arguments but I'm not sure how to translate
that to a working solution.

On Nov 23, 10:29 pm, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> If I'm understanding correctly, it seems that we could probably find an
> elegant enough solution for this - either by attaching priority meta to the
> categories, or by choosing the highest menu order category.  With either
> approach, you could specify category priority (either by ordering it higher
> on the category page, or setting priority in meta), and the [0] index key
> would be based on that, rather than on which one was selected first on the
> product.
>
> Thoughts?
>
> Thanks,
>

> *M. Justin Sainton


> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330

> (f) 1.413.723.0396*

> >> exactly what i'm looking for:http://wordpress.org/extend/**
> >> plugins/hikari-category-**permalink/<http://wordpress.org/extend/plugins/hikari-category-permalink/>


> >> <  the only problem is its functionality doesn't extend to custom post
> >> types (like WPEC's)
>
> >>     [01:28:10 PM] Michael Visser: I guess you could throw in a check
> >> there that says:
> >>     [01:28:31 PM] Michael Visser: if you have more than category then
> >> use the current categories slug
>
> >>     [01:28:32 PM] Enzo: (plus i'm not sure if hikari would also
> >> override the breadcrumbs)
> >>     [01:30:43 PM] Enzo: i tried to think of a solution earlier:
>
> >>        $parent_cat = 17; // Producers
> >>        foreach ( $product_categories as $product_category ) {

> >>         if ( $product_category->category_**parent == $parent_cat ) {

> > To post to this group, send email to wordpress-e-commerce-plugin@**
> > googlegroups.com <wordpress-e-c...@googlegroups.com>.


> > To unsubscribe from this group, send email to wordpress-e-commerce-plugin+

> > **unsub...@googlegroups.com<wordpress-e-commerce-plugin%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group athttp://groups.google.com/**
> > group/wordpress-e-commerce-**plugin?hl=en<http://groups.google.com/group/wordpress-e-commerce-plugin?hl=en>
> > .

Enzo

unread,
Nov 24, 2011, 3:42:57 AM11/24/11
to WordPress e-Commerce Plugin Development
Hi Dan - Michael's summary is correct. In addition, the category I
would like to give priority to is never actually tagged in a product
post, rather, it's the children categories under it that are (i.e.
parent category = 'Producers', tagged children categories = 'Producer
Names').

On Nov 24, 4:42 am, Michael Visser <mich...@visser.com.au> wrote:
> Hi Dan,
>
> Control over Category link names for Product Permalinks, e.g.
>
> http://www.domain.com/products-page/[[[category]]]/product-name/
>
> Where a Product belongs to multiple Categories then the first Category off the stack is used as the Category link, without any ordering or priority rules available. Some control over this would avoid confusion over Product Permalinks.
>
> Cheers,
>

> Michael Visser | Visser Labshttp://www.visser.com.au

> For more options, visit this group athttp://groups.google.com/group/wordpress-e-commerce-plugin?hl=en.

Zao Web Design, LLC

unread,
Nov 24, 2011, 3:47:42 AM11/24/11
to wordpress-e-c...@googlegroups.com
That's a bit edge case, as it wouldn't be resolved by the initial original argument of choosing which (of multiple) categories a project should utilize from a URL, nor would it be resolved by the new hierarchical permalinks options

Sounds to me like we should probably filter by term order, and potentially filter the category with parameters that at least include the $product_id and $term_id, so a plugin could filter it and do what Enzo is requiring.  That said, Enzo, you should probably be categorizing the products in the category they are intended to be in (If they are in a "Producer Names" category, don't just select the parent, "Producer", make sure they are in "Producer Names"). 

Thanks,

M. Justin Sainton
Zao Web Design, LLC
Principal / Project Manager
http://www.zaowebdesign.com
(c) 971.222.6330
(f) 1.413.723.0396

Enzo

unread,
Nov 24, 2011, 4:23:31 AM11/24/11
to WordPress e-Commerce Plugin Development
That's the thing, I am only tagging with "Producer Name", not
"Producer", since it's generic and doesn't have relevance except as a
parent tag for the various "Producer Names" to appear under
(especially as part of the category navigation widget I've set up).
Thus, the trick would be to prioritise by making a conditional
statement to the product's category having "Producer Name" as a
parent. Not quite sure how tho, found cat_is_ancestor_of (http://
codex.wordpress.org/Function_Reference/cat_is_ancestor_of) but nothing
like "cat_is_child_of" to do this.

Could someone please offer some code or a plugin/patch? As I said, my
PHP is iffy.

Thanks again for your time/efforts, it's much appreciated.

On Nov 24, 10:47 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> That's a bit edge case, as it wouldn't be resolved by the initial original
> argument of choosing which (of multiple) categories a project should
> utilize from a URL, nor would it be resolved by the new hierarchical
> permalinks options
>
> Sounds to me like we should probably filter by term order, and potentially
> filter the category with parameters that at least include the $product_id
> and $term_id, so a plugin could filter it and do what Enzo is requiring.
>  That said, Enzo, you should probably be categorizing the products in the
> category they are intended to be in (If they are in a "Producer Names"
> category, don't just select the parent, "Producer", make sure they are in
> "Producer Names").
>
> Thanks,
>

> *M. Justin Sainton
> Zao Web Design, LLC


> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

Zao Web Design, LLC

unread,
Nov 24, 2011, 4:36:54 AM11/24/11
to wordpress-e-c...@googlegroups.com
Yeah, I wouldn't necessarily use that function.

What I'd probably do to keep core nice and light is, around Line 1220 (right before the $rewritereplace array is created), add the following line - 

$category_slug = apply_filters( 'wpsc_product_permalink_cat_slug', $category_slug, $post_id );

Then, write a plugin that hooks into that.  Check if the $post_id is in your specific category, and if so, return the category slug you're needing.

Easy enough?

Thanks,

M. Justin Sainton
Zao Web Design, LLC
Principal / Project Manager
http://www.zaowebdesign.com
(c) 971.222.6330
(f) 1.413.723.0396

Enzo

unread,
Nov 24, 2011, 7:40:22 AM11/24/11
to WordPress e-Commerce Plugin Development
I'm afraid you're going to have to walk me through it, I'm not really
much of a PHP coder. Anything I do usually involves manipulating
existing code using basic logic until I get to the result I need.

I've added the line to wpsc-functions.php (as specified) now what's
the best way to reference it to ensure that the specified category
(esp. it's child subsets) are given sorting priority in permalinks/
breadcrumbs?

On Nov 24, 11:36 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> Yeah, I wouldn't necessarily use that function.
>
> What I'd probably do to keep core nice and light is, around Line 1220
> (right before the $rewritereplace array is created), add the following line
> -
>
> $category_slug = apply_filters( 'wpsc_product_permalink_cat_slug',
> $category_slug, $post_id );
>
> Then, write a plugin that hooks into that.  Check if the $post_id is in
> your specific category, and if so, return the category slug you're needing.
>
> Easy enough?
>
> Thanks,
>

> *M. Justin Sainton
> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

> ...
>
> read more »

Enzo

unread,
Nov 24, 2011, 2:27:53 PM11/24/11
to WordPress e-Commerce Plugin Development
Um, anyone?..

> ...
>
> read more »

Zao Web Design, LLC

unread,
Nov 24, 2011, 2:51:09 PM11/24/11
to wordpress-e-c...@googlegroups.com
It's Thanksgiving here in the States ;)  Probably won't get a peep this side of the world until Monday.  You may have better luck commissioning one of the consultants listed at GetShopped to develop the solution for you (and submit a patch to the core team to ensure future compatibility).

Thanks,

M. Justin Sainton
Zao Web Design, LLC
Principal / Project Manager
http://www.zaowebdesign.com
(c) 971.222.6330
(f) 1.413.723.0396
> ...
>
> read more »

--
You received this message because you are subscribed to the Google Groups "WordPress e-Commerce Plugin Development" group.

Enzo

unread,
Nov 25, 2011, 3:13:39 AM11/25/11
to WordPress e-Commerce Plugin Development
Ah, that explains it. I'll hold out then and give GetShopped a shout
in the meantime.

Incidentally, I looked at possibly reworking the site to have a single
category for products and it goes against what I'm trying to
accomplish, so a solution here would still be first prize.

If anyone feels like contributing an answer, I'm all ears.

On Nov 24, 9:51 pm, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> It's Thanksgiving here in the States ;)  Probably won't get a peep this
> side of the world until Monday.  You may have better luck commissioning one
> of the consultants listed at GetShopped to develop the solution for you
> (and submit a patch to the core team to ensure future compatibility).
>
> Thanks,
>

> *M. Justin Sainton
> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

> ...
>
> read more »

Enzo

unread,
Nov 28, 2011, 1:33:33 AM11/28/11
to WordPress e-Commerce Plugin Development
Hoping people are back today. *bump*

> ...
>
> read more »

Enzo

unread,
Nov 28, 2011, 6:32:11 AM11/28/11
to WordPress e-Commerce Plugin Development
Is there any way that wp_list_categories() (http://codex.wordpress.org/
Template_Tags/wp_list_categories) could be used? I'm looking
specifically at this example:

--start--

Only Show Children of a Category

The following example code generates category links, sorted by ID,
only for the children of the category with ID 8; it shows the number
of posts per category and hides category descriptions from the title
attribute of the generated links. Note: If there are no posts in a
parent Category, the parent Category will not display.

<ul>
<?php
wp_list_categories('orderby=id&show_count=1&use_desc_for_title=0&child_of=8'); ?
>
</ul>

---end---

Perhaps as an alternative category reference for the permalink/
breadcrumb structures?..

On Nov 24, 11:36 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> Yeah, I wouldn't necessarily use that function.
>
> What I'd probably do to keep core nice and light is, around Line 1220
> (right before the $rewritereplace array is created), add the following line
> -
>
> $category_slug = apply_filters( 'wpsc_product_permalink_cat_slug',
> $category_slug, $post_id );
>
> Then, write a plugin that hooks into that.  Check if the $post_id is in
> your specific category, and if so, return the category slug you're needing.
>
> Easy enough?
>
> Thanks,
>

> *M. Justin Sainton
> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

> ...
>
> read more »

Enzo

unread,
Nov 29, 2011, 2:04:14 AM11/29/11
to WordPress e-Commerce Plugin Development
Hi Dan - could you please take a look, if you have a moment?..

Much appreciated.

Zao Web Design, LLC

unread,
Nov 29, 2011, 2:17:52 AM11/29/11
to wordpress-e-c...@googlegroups.com
I'll pipe in for him, as it's after work hours where Dan's at - and he wouldn't be able to help on a technical question like this :).

wp_list_categories isn't what you'd want here.  While you can use it with custom taxonomies, the primary purpose of the function is presentational - it would be overkill and inappropriate based on what you're needing to do.

As I mentioned before, your best bet is to petition the core team (currently myself, Gary Cao and Michelle) for the filter I mentioned and write a plugin (or commission someone to write a plugin) to utilize that filter to switch the category slug for a particular product or array of products.  Seems like a reasonable enough filter to add, I wouldn't be opposed.

Thanks,

M. Justin Sainton
Zao Web Design, LLC
Principal / Project Manager
http://www.zaowebdesign.com
(c) 971.222.6330
(f) 1.413.723.0396

Enzo

unread,
Nov 29, 2011, 3:41:19 AM11/29/11
to WordPress e-Commerce Plugin Development
That would be great. Is there anything required from my part for the
'petitioning'? I've also tried asking for help here:

http://getshopped.org/forums/topic/specifying-breadcrumbpermalink-category-hierarchy/

and here:

http://wordpress.stackexchange.com/questions/34915/wpec-specifying-breadcrumb-permalink-category-hierarchy

to no avail. Please keep me posted.

On Nov 29, 9:17 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> I'll pipe in for him, as it's after work hours where Dan's at - and he
> wouldn't be able to help on a technical question like this :).
>
> wp_list_categories isn't what you'd want here.  While you can use it with
> custom taxonomies, the primary purpose of the function is presentational -
> it would be overkill and inappropriate based on what you're needing to do.
>
> As I mentioned before, your best bet is to petition the core team
> (currently myself, Gary Cao and Michelle) for the filter I mentioned and
> write a plugin (or commission someone to write a plugin) to utilize that
> filter to switch the category slug for a particular product or array of
> products.  Seems like a reasonable enough filter to add, I wouldn't be
> opposed.
>
> Thanks,
>

> *M. Justin Sainton
> Zao Web Design, LLC


> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

Zao Web Design, LLC

unread,
Nov 29, 2011, 3:49:32 AM11/29/11
to wordpress-e-c...@googlegroups.com
The forums on GetShopped are primarily community-driven - if there isn't a response there, it's because there was no traction from anyone there.  And no one really looks at the Stack Exchange site for stuff like this.  

I'll look up my previous email in the morning and apply the necessary filter - it will be in your hands from there ;)  That all said, it could be easily argued that you could fix the entire situation by not having the parent categories (Producer) at all...those could be converted to tags, and categories could be strictly limited to hierarchical constructs you'd like in the URL.

But that's a separate discussion :)

Thanks,

M. Justin Sainton
Zao Web Design, LLC

Enzo

unread,
Nov 29, 2011, 4:47:26 AM11/29/11
to WordPress e-Commerce Plugin Development
I know, I understand the reasoning and have looked at that option..
I'd prefer to proceed this way all the same.

Thanks again for the help.

On Nov 29, 10:49 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> The forums on GetShopped are primarily community-driven - if there isn't a
> response there, it's because there was no traction from anyone there.  And
> no one really looks at the Stack Exchange site for stuff like this.
>
> I'll look up my previous email in the morning and apply the necessary
> filter - it will be in your hands from there ;)  That all said, it could be
> easily argued that you could fix the entire situation by not having the
> parent categories (Producer) at all...those could be converted to tags, and
> categories could be strictly limited to hierarchical constructs you'd like
> in the URL.
>
> But that's a separate discussion :)
>
> Thanks,
>

> *M. Justin Sainton
> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

> On Tue, Nov 29, 2011 at 12:41 AM, Enzo <loren...@gmail.com> wrote:
> > That would be great. Is there anything required from my part for the
> > 'petitioning'? I've also tried asking for help here:
>

> >http://getshopped.org/forums/topic/specifying-breadcrumbpermalink-cat...
>
> > and here:
>
> >http://wordpress.stackexchange.com/questions/34915/wpec-specifying-br...

Zao Web Design, LLC

unread,
Nov 29, 2011, 4:58:07 AM11/29/11
to wordpress-e-c...@googlegroups.com
Alright, you're all set, as of revision 1400 -  http://code.google.com/p/wp-e-commerce/source/detail?r=1400 

Thanks,

M. Justin Sainton
Zao Web Design, LLC

Enzo

unread,
Nov 29, 2011, 5:11:28 AM11/29/11
to WordPress e-Commerce Plugin Development
Thanks - apart from updating the wpsc-functions.php file, how would I
go about implementing the update? Say I want to create a 'category
prioritisation' plugin that hooks into the filter, what's the simplest/
most elegant method? I'm afraid I'm still annoyingly dumb when it
comes to writing PHP from scratch. :/

On Nov 29, 11:58 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> Alright, you're all set, as of revision 1400 -http://code.google.com/p/wp-e-commerce/source/detail?r=1400
>

> Thanks,
>
> *M. Justin Sainton
> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

Enzo

unread,
Nov 29, 2011, 6:04:36 AM11/29/11
to WordPress e-Commerce Plugin Development
C'mon man, all you've done is re-elaborate your previous reply. If
you're not prepared to take it further, at least point me in the
direction of someone who can. ><

On Nov 29, 11:58 am, "Zao Web Design, LLC" <off...@zaowebdesign.com>
wrote:


> Alright, you're all set, as of revision 1400 -http://code.google.com/p/wp-e-commerce/source/detail?r=1400
>

> Thanks,
>
> *M. Justin Sainton
> Zao Web Design, LLC
> Principal / Project Managerhttp://www.zaowebdesign.com
> (c) 971.222.6330
> (f) 1.413.723.0396*
>

Michael Visser

unread,
Nov 29, 2011, 6:23:07 AM11/29/11
to wordpress-e-c...@googlegroups.com
Hi Enzo,

Seems at this point it's best to go back to the Consultants list on GetShopped.org, with Justin's change the category slug can now be overridden in a simple Plugin. Thanks Justin.

http://getshopped.org/resources/wp-consultants/

We're doing our best to assist and this conversation is now a support issue, not a feature request and should be continued in the Forums or via Consultants. Cheers to Justin for making that change. Thanks guys.


Cheers,


Michael Visser | Visser Labs
http://www.visser.com.au

This email is confidential and may also be privileged. If you are not the intended recipient, please notify me immediately by using my e-mail address above. You should not copy it or use it for any other purpose, nor disclose its contents to any other person. In messages of non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect the views and opinions of Visser Labs.


-----Original Message-----
From: wordpress-e-c...@googlegroups.com [mailto:wordpress-e-c...@googlegroups.com] On Behalf Of Enzo
Sent: Tuesday, 29 November 2011 7:05 PM
To: WordPress e-Commerce Plugin Development
Subject: Re: wordpress-e-commerce-plugin specifying wpec's breadcrumb/permalink category hierarchy

Enzo

unread,
Nov 29, 2011, 6:41:11 AM11/29/11
to WordPress e-Commerce Plugin Development
Alright, although I would like to point out that Zao Web Design is on
the linked list of consultants.

Recommendations?.. There are -so many- and their forum has been
useless so far:

http://getshopped.org/forums/topic/specifying-breadcrumbpermalink-category-hierarchy/

On Nov 29, 1:23 pm, Michael Visser <mich...@visser.com.au> wrote:
> Hi Enzo,
>
> Seems at this point it's best to go back to the Consultants list on GetShopped.org, with Justin's change the category slug can now be overridden in a simple Plugin. Thanks Justin.
>
> http://getshopped.org/resources/wp-consultants/
>
> We're doing our best to assist and this conversation is now a support issue, not a feature request and should be continued in the Forums or via Consultants. Cheers to Justin for making that change. Thanks guys.
>
> Cheers,
>

> Michael Visser | Visser Labshttp://www.visser.com.au

> ...
>
> read more »

Agus MU

unread,
Nov 29, 2011, 6:51:33 AM11/29/11
to wordpress-e-c...@googlegroups.com
Dear Enzo,

Please understand that it is Plugin Development group, not for discussing a deep customization topic. So, yes, it is better to follow Michael Visser suggestion to contact one of WP consultant here, http://getshopped.org/resources/wp-consultants/

For me, it is all about decision. When working with post category and product category taxonomy where they support "multiple" categories, we have to decide what category that will be used for  permalink / breadcrumb... And what WPEC do is simple  and perfect for most of WPEC users. You can see similar approach  at other themes/plugins, for example breadcrumb class function from Genesis Framework also choose the first category when a post has multiple categories. So, it is natural... :)

I am a developer, but also a user, so hacking core plugin code is not recommended here, because you will get more troubles when you try to update your plugin. So, I always try to find the simple way to get what I want, without hacking the core plugin.

So, when I saw your first email here, I thought the simple way to get what you  wantt, you can use "Producer Name" as your parent category! No need to add "Producers" parent category here. And don't use multiple category for all of your products! One producer name for one product... That's simple...

Your next question: But, I want to add different category group to my products, let's say "Brands", "Country", "Genre", etc...? The elegant solution is adding custom taxonomy for every category groups above!
http://codex.wordpress.org/Function_Reference/register_taxonomy

So, you can extend your WPEC capability without hacking any WPEC plugin code!!!

Just my two cents to make your problem looks easy...

Best Regards,
Agus

Enzo

unread,
Nov 29, 2011, 7:21:12 AM11/29/11
to WordPress e-Commerce Plugin Development
Hello Agus,

I agree with you and I'm happy to proceed as you say.

My only frustration is that there's no way of specifying the first
category, it's simply taken from the first alphabetically sorted slug
value across all the different product categories and therefore varies
from post to post.

I am still in disbelief that WPEC's core doesn't have a the option in
WP's admin to assign priority to categories for this purpose;
especially when this type of feature has been present in so many CMS's
(e.g. drupal) for years!

I'm not looking to hack the core, I'm happy to leave the wpec-
functions.php as clean as possible. What I am asking for is either to
have the WPEC plugin updated to cater for this (surely intuitive)
feature or for someone to recommend me to an individual who may be
able to assist me in developing a plugin that will do this.

The only alternative (it seems) is to have one type category across
all the products and to migrate all the other categories to tags
instead, which doesn't work for what I'm attempting to do because I
wish to preserve the categories as a hierarchically sorted navigation
in the sidebar.

Also, what I've mentioned before is that I am not a PHP coder, I
simply modify the code I find to achieve the desired effect. Talk of
custom taxonomies and linking me to sites that elaborate on that is
way over my head.

Bottom line: please can someone refer me to someone that can help me
write a plugin that will accomplish my request? I don't wish to waste
anyone's time that isn't interested in doing so.

Thanks again.

On Nov 29, 1:51 pm, Agus MU <agus...@gmail.com> wrote:
> Dear Enzo,
>
> Please understand that it is Plugin Development group, not for discussing a
> deep customization topic. So, yes, it is better to follow Michael Visser

> suggestion to contact one of WP consultant here,http://getshopped.org/resources/wp-consultants/


>
> For me, it is all about decision. When working with post category and
> product category taxonomy where they support "multiple" categories, we have
> to decide what category that will be used for  permalink / breadcrumb...
> And what WPEC do is simple  and perfect for most of WPEC users. You can see
> similar approach  at other themes/plugins, for example breadcrumb class
> function from Genesis Framework also choose the first category when a post
> has multiple categories. So, it is natural... :)
>
> I am a developer, but also a user, so hacking core plugin code is not
> recommended here, because you will get more troubles when you try to update
> your plugin. So, I always try to find the simple way to get what I want,
> without hacking the core plugin.
>
> So, when I saw your first email here, I thought the simple way to get what
> you  wantt, you can use "Producer Name" as your parent category! No need to
> add "Producers" parent category here. And don't use multiple category for
> all of your products! One producer name for one product... That's simple...
>
> Your next question: But, I want to add different category group to my
> products, let's say "Brands", "Country", "Genre", etc...? The elegant

> solution is adding custom taxonomy for every category groups above!http://codex.wordpress.org/Function_Reference/register_taxonomy


>
> So, you can extend your WPEC capability without hacking any WPEC plugin
> code!!!
>
> Just my two cents to make your problem looks easy...
>
> Best Regards,
> Agus
>

> ...
>
> read more »

Agus MU

unread,
Nov 29, 2011, 7:29:46 AM11/29/11
to wordpress-e-c...@googlegroups.com
Hello Enzo,

I can't recommend anyone here because I don't have any experience with them, if you want to try, you can contact most of developers here and ask their quotes. http://getshopped.org/resources/wp-consultants/developers

Could you send your website URL to me?  I would love to give you some suggestions  when I can see it.

Thanks,
Agus

Enzo

unread,
Nov 29, 2011, 7:34:06 AM11/29/11
to WordPress e-Commerce Plugin Development
I would if I could; at the moment it's being developed on a localhost.
I will be putting it live soon though. I'm proceeding anyway and live
in the hope that a solution will present itself.

I've written to a few of the developers and now I'm waiting to see if
anyone replies.

On Nov 29, 2:29 pm, Agus MU <agus...@gmail.com> wrote:
> Hello Enzo,
>
> I can't recommend anyone here because I don't have any experience with
> them, if you want to try, you can contact most of developers here and ask

> their quotes.http://getshopped.org/resources/wp-consultants/developers


>
> Could you send your website URL to me?  I would love to give you some
> suggestions  when I can see it.
>
> Thanks,
> Agus
>

> ...
>
> read more »

Michael Visser

unread,
Nov 29, 2011, 11:41:46 PM11/29/11
to wordpress-e-c...@googlegroups.com
Hi Enzo,

Please star the Google Code topic and bump the Support Forum topic, else try the Consultants list again.

This is a Core focussed mailing list, now that Justin's patch has been created this is now a support issue and should be followed up via the Support Forum or Consultants list. In time this feature may be further developed but these guys are being kept very busy with releases and as such a third-party solution which will need to be developed for your site from the below sources. Hope this helps.

http://getshopped.org/forums/

http://getshopped.org/resources/wp-consultants/

Cheers,


Michael Visser | Visser Labs
http://www.visser.com.au

This email is confidential and may also be privileged. If you are not the intended recipient, please notify me immediately by using my e-mail address above. You should not copy it or use it for any other purpose, nor disclose its contents to any other person. In messages of non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect the views and opinions of Visser Labs.


-----Original Message-----
From: wordpress-e-c...@googlegroups.com [mailto:wordpress-e-c...@googlegroups.com] On Behalf Of Enzo
Sent: Tuesday, 29 November 2011 8:21 PM
To: WordPress e-Commerce Plugin Development
Subject: Re: wordpress-e-commerce-plugin specifying wpec's breadcrumb/permalink category hierarchy

Hello Agus,

Thanks again.

--

Dan Milward

unread,
Nov 30, 2011, 8:30:53 PM11/30/11
to wordpress-e-c...@googlegroups.com
Hi Enzo,

Actually I do not see this as being suitable for the forums since it is a request for work.

The core team is busy working on the next release of the WP e-Commerce Plugin and as such we're not taking on new features right now. That said we are totally happy to add new hooks and filters (which we've done for you) if it helps make the WP e-Commerce Plugin even more extendible. This is the WordPress way :))

I agree with Visser and I think that at this point you need to be finding / commissioning a developer to make this into a Plugin.

Best,
Dan

Enzo

unread,
Dec 2, 2011, 1:32:11 AM12/2/11
to WordPress e-Commerce Plugin Development
Hi Dan,

No worries - I took the advice to look up a developer and succeeded
with Lee Willis (http://www.leewillis.co.uk/) - he was able to help me
with this by creating a 'Permalink Forcer' plugin that hooks into wpsc-
functions.php (revision 1400).

Thank you guys for your input and I'm relieved to have sorted this out
in the end.

Cheers,
- Lorenzo

> ...
>
> read more »

Dan Milward

unread,
Dec 2, 2011, 7:52:16 PM12/2/11
to wordpress-e-c...@googlegroups.com
That is great news!

If you submit the Plugin here: http://getshopped.org/fpt-plugins/

Then other members of our community will also benefit from this.

Best,
Dan

>> read more �

Lee Willis

unread,
Dec 3, 2011, 3:18:44 AM12/3/11
to wordpress-e-c...@googlegroups.com
It's probably too specific to this particular site to be generically useful as a plugin. If Enzo's OK with it, then I'm happy to post the code in a quick blog post in case anyone finds it useful as a starting point for a solution of their own.

Enzo?

Cheers
Lee

read more »

--
You received this message because you are subscribed to the Google Groups "WordPress e-Commerce Plugin Development" group.
To post to this group, send email to wordpress-e-commerce-plugin@googlegroups.com.
To unsubscribe from this group, send email to wordpress-e-commerce-plugin+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages