You are here:  » Product Description within Featured Products


Product Description within Featured Products

Submitted by newpbc on Tue, 2012-09-18 11:51 in

Would it be possible to do something simalar to whats described here
http://www.pricetapestry.com/node/3466
within the wordpress pluggin

Im looking to display the info within a slider I've coded

Submitted by support on Tue, 2012-09-18 15:03

Hi,

Sure - the plugin already has a built-in tidy substring function; and the description is already included in the SELECT so all that's needed is to add the code to support the %DESCRIPTION% placeholder within your Featured Products / Each template.

To add this, edit pto_featured.php and look for the following code at line 77:

  $each = str_replace("%PRODUCT_NAME%",$row->name,$each);

...and REPLACE with:

  $each = str_replace("%PRODUCT_NAME%",$row->name,$each);
  $each = str_replace("%DESCRIPTION%",pto_common_substr($row->description,50),$each);

To change the length adjust the constant 50 in the call to pto_common_substr() as required on the second line of the replacement.

With the above in place, you can then include %DESCRIPTION% within your Featured Products / Each HTML template in wp-admin > Settings > PriceTapestry.org...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by newpbc on Tue, 2012-09-18 16:37

Thanks David worked a treat