Forum
Shop Paypal category_slugs
Hi I am trying to get the product's category to pull to the product.php page. I have added the category_slugs call to the template and it shows and works, until the product is added to two categories, then it combines the categories in the link. How can I get it to publish separate links for each category listed?
https://creative-timbers-furniture-hereford.co.uk/shop/product.php?s=wooden-coat-rack
Thanks Tony
Quick update, updated to latest version to see if I could use the Categories templates. Now when I try and save a listing in the back end I get a blank screen!
What does it say in your error log?
https://solutions.grabaperch.com/development/why-am-i-getting-a-blank-page
Here's the error log:
[Tue Sep 08 17:20:51 2015] [error] [client 212.159.151.34] PHP Fatal error: Call to a member function return_instance() on a non-object in /var/www/vhosts/creative-timbers-furniture-hereford.co.uk/httpdocs/perch/core/lib/api/PerchAPI_Form.class.php on line 423, referer: https://creative-timbers-furniture-hereford.co.uk/perch/addons/apps/perch_shop/edit/?id=1
Have you updated any installed apps?
I have now. Sorted the white screen issue, thanks. Now back to the category links...
Ok, what's the current issue?
When I pull the tag 'category_slugs', a product in multiple categories will have the link set with all the slugs combined:
Is there a way to pull them as separate links? You can see the site here:
https://creative-timbers-furniture-hereford.co.uk/shop/product.php?s=wooden-coat-rack
Thanks Tony
I think in the old PayPal app you need to use
perch_shop_product_categories()
in order to template the individual categories.Is that as an id?
~~ <perch:shop id="perch_shop_product_categories()" /> ~~
Tony, I had the same issue, so can help.
In your product.php page, add the following...
And in your custom 'my_category_links.html' template (in perch/templates/shop), you'll have something like this...
perch_shop_product_categories() is nowhere to be found in the documentation, but is very useful. Critical actually for bringing category information into the product page.
If you're still having issues after doing the above, then it's back to Drew :-)