You are here:  » Extrafilters link


Extrafilters link

Submitted by henk on Thu, 2012-12-27 14:13 in

Hi David,

Is it possible to make a link ( in product main ) from extra fields to other product with the same subcategory:

I have one filter with database field subcat.

Thx
Henk

Submitted by support on Thu, 2012-12-27 15:42

Hi Henk,

Sure - you can construct the search link directly into the extra fields display code within the Product / Main template. As pre your recent thread regarding conditional display, you might now be using something like this:

%IFDB_subcat%Sub Category: %DB_subcat%%ENDIFDB_subcat%

...so you could use:

%IFDB_subcat%
Sub Category: <a href='/shopping?pto_q=subcat:%DB_subcat%'>%DB_subcat%</a>
%ENDIFDB_subcat%

(where /shopping is your container permalink URL - the page containing just the [pto] shortcode...)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Thu, 2012-12-27 16:33

Hi David,

I don't get the link working to the subcat.

Thx
Henk

Submitted by support on Thu, 2012-12-27 17:21

Hi Henk,

Could you possibly post an example page so I can view the HTML that is being generated and I'll check it out...

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Thu, 2012-12-27 19:14

Hi David,

The Link:

{link saved}

and how can you convert a database to utf-8 ?

some are latin1_swedish_ci ????

Thx
Henk

Submitted by support on Fri, 2012-12-28 09:26

Hi Henk,

Ah - it would need to be passed through as a filter - have a go with:

%IFDB_subcat%
Sub Category: <a href='/shopping?pto_q=bw:&subcatFilter=%DB_subcat%'>%DB_subcat%</a>
%ENDIFDB_subcat%

To set the MySQL connection to utf8 (same as WordPress by default), in includes/database.php add the following code right at the end of the file, immediately before the closing PHP tags:

  database_querySelect("SET NAMES utf8",$result);

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Fri, 2012-12-28 10:08

Almost:

Sub Category: <a href='/shopping?pto_q=bw:&subcatFilter=%DB_subcat%'>%DB_subcat%</a>

=

Sub Category: <a href='/shopping?pto_q=bw:&pto_subcatFilter=%DB_subcat%'>%DB_subcat%</a>

Thx
Henk

Submitted by support on Fri, 2012-12-28 10:21

Ah yes - was in Price Tapestry standalone mode for a moment there... glad that's working, Henk!

Cheers,
David.
--
PriceTapestry.com