You are here:  » featured products


featured products

Submitted by paullas on Tue, 2013-04-02 12:48 in

hi david

I am looking at having 3 rows of random products, each with 3 items in each row on the front page. I have got [pto featured="random"] in the page but doesnt seem to be displaying anything. Do i need to add more code (sorry cant remember)

Thanks

Paul

Submitted by support on Tue, 2013-04-02 12:54

Hi Paul,

That's not built in, but there's a nice mod in this thread for creating a "special" section name, "random:n", where n is the number of random products required, so you would use:

[pto featured="random:9"]

For the 3 rows of 3 display, from the Featured Products / Each template on the PriceTapestry.org Settings page (wp-admin > Settings > PriceTapestry.org), simply add the following to the end:

%IF_EVERY3%
</tr><tr>
%ENDIF_EVERY3%

Cheers!
David
--
PriceTapestry.com

Submitted by paullas on Tue, 2013-04-02 13:36

Hi

when i add the above mod i get Parse error: syntax error, unexpected T_FUNCTION in /home/*****/public_html/wp-content/plugins/pto/pto_featured.php on line 1

also what do you mean by add it to the end?

thanks

paul

Submitted by support on Tue, 2013-04-02 13:52

Hi Paul,

That sounds like the first line of pto_featured.php may have been accidentally deleted during the edit - it should begin:

<?php

If you're not sure, if you would like to email me your modified version I'll check it and the modification for you.

Once the modification is in place, the shortcode:

[pto featured="random:9"]

...will give you 9 random featured products, each of which is displayed by your Featured Products / Each template, which you will find in the HTML section of the PriceTapestry.org configuration page, just below where you were editing Base HREF earlier.

The %IF_EVERYn%....%ENDIF_EVERYn% are placeholders than you can use in certain templates to insert code every n items, so in the case of Featured Products, if you want to start a new row every 3 items, you would add to the end of your Featured Products / Each template:

%IF_EVERY3%
</tr><tr>
%ENDIF_EVERY3%

Hope this helps!

Cheers,
David.
--
PriceTapestry.com