©2006-2017 IAAI Software

Contact Us Privacy Policy

Add a trailing slash to products

Submitted by twdesigns on Tue, 2013-04-30 13:21.

David,

For the life of me I can't remember how to do this. I found the code where I removed the .html extension in pto.php but what I would like to do is instead of having a product end as www.testtest.com/product/this-is-the-product I would like it to end in a trailing slash.

Changing my permalinks work but links generated by PT by default show no trailing slash. Where would I correct this?

Submitted by support on Tue, 2013-04-30 13:39.

Hi tommy,

After removing ".html" and replacing with "/" in pto.php, you need to make the corresponding change in the pto_common_productHREF() function in pto_common.php. Look for the following code at line 48:

return get_bloginfo('url').$pto_config_productBaseHREF.pto_common_hyphenate($product->normalised_name).".html";

...and REPLACE with:

return get_bloginfo('url').$pto_config_productBaseHREF.pto_common_hyphenate($product->normalised_name)."/";

Cheers,
David.
--
PriceTapestry.com

Submitted by twdesigns on Tue, 2013-04-30 23:47.

That did it! I swear you should get a "Support" Trophy every month.