Forum

Thread tagged as: Problem, PayPal

Can't access custom template with perch_shop_custom or perch_shop_product array.

Diagnostics report
HEALTH CHECK

PHP 5.5.38 is up to date
MySQL 5.6.36-82.0-log is up to date
Image processing available
SUMMARY INFORMATION

Perch: 2.8.34, PHP: 5.5.38, MySQL: 5.1.73, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (4.6), perch_shop_paypal (1.2.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_shop_paypal', 'perch_blog', 'kirk_admin_links', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /chroot/home/ultrabre/ultrabreezesuits.com/html/perch
PERCH_CORE: /chroot/home/ultrabre/ultrabreezesuits.com/html/perch/core
PERCH_RESFILEPATH: /chroot/home/ultrabre/ultrabreezesuits.com/html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 64M, Max POST 64M, Memory: 512M, Total max file upload: 64M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
HTTP_HOST: www.ultrabreezesuits.com
DOCUMENT_ROOT: /home/ultrabre/ultrabreezesuits.com/html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

I can retrieve individual products using this:

 <?php
  perch_shop_product(perch_get('s'), [
      // 'template' => 'shop/product.html',
   ]);
  ?>

But if I uncomment the template reference, the product-specific content disappears. I've tried various incarnations of the path but nothing seems to work. I'm not sure if I'm missing something or if something is turned off.

Kyle Summer

Kyle Summer 0 points

  • 3 years ago

Kyle, I am thinking you only need the template name here, not the directory. Try that while I go and look it up, cause I am drawing a blank here.

Yes, you only need the template name, unless you have changed the template directory to be below /perch/templates/shop...

documentation

https://docs.grabaperch.com/functions/shop/products/perch-shop-product/

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug you should get an error showing the template path that is being used.

Robert Ketter said:

Yes, you only need the template name, unless you have changed the template directory to be below /perch/templates/shop...

documentation

https://docs.grabaperch.com/functions/shop/products/perch-shop-product/

I thought so too, and tried that before also but no luck. I tried it again with Debug Mode running and I'm not seeing anything I recognize as an error.

Time    Δ   Debug Message
0.0152  0   [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='7ed3fd5bd3e0da2e93d678859b01159a' LIMIT 1
0.016   0.0008  UPDATE perch2_users SET userHash='386892b7da90266a9be2f090b899d04c' WHERE userID='1'
0.0173  0.0013  [37] SELECT p.privKey FROM perch2_user_privileges p
0.0183  0.001   [33] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
0.0187  0.0004  [1] SELECT * FROM perch2_shop_products WHERE productStatus='Live' AND productSlug= 'ultra-breeze-jacket'
0.0189  0.0002  [nil] SELECT categoryID FROM perch2_shop_products_to_categories WHERE productID = '2'
0.0197  0.0007  [1] SELECT * FROM perch2_pages WHERE pagePath='/shop/product.php' LIMIT 1
0.0205  0.0008  [1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Discount Code' AND (regionPage='/shop/product.php' OR regionPage='*')
0.0207  0.0002  [1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=42 AND idx.itemRev=2)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
0.021   0.0003  [1] Using template: /templates/content/text.html
0.0217  0.0007  Using template: /templates/search/search-form.html
0.023   0.0013  [1] SELECT groupID FROM perch2_navigation WHERE groupSlug='page-top' LIMIT 1
0.0232  0.0002  [9] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=1 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
0.0234  0.0002  [0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=1 AND p.pagePath='/shop/product.php' LIMIT 1
0.0237  0.0003  Using template: /templates/navigation/ubs-top.html
0.0239  0.0002  [6] Using template: /templates/navigation/item.html
0.028   0.0041  [1] SELECT p.* FROM perch2_shop_products p WHERE productStatus='Live' AND productSlug='ultra-breeze-jacket'
0.0283  0.0002  
Array
(
    [0] => Array
        (
            [productID] => 2
            [productCode] => ubs-jkt
            [productTitle] => Ultra Breeze Jacket
            [productSlug] => ultra-breeze-jacket
            [productDescRaw] => 
3 layers of ventilated fabric keep you cool and protected.
Roomy hood stays in place and off your face.
Made in the USA.

            [productDescHTML] => 
3 layers of ventilated fabric keep you cool and protected.
Roomy hood stays in place and off your face.
Made in the USA.

            [productDynamicFields] => {"productOptions_html":null,"ubs_gallery_images":[{"lg_image":{"assetID":"55","title":"Jkt 1 15","_default":"\/perch\/resources\/jkt-1-15-1.jpg","bucket":"default","path":"jkt-1-15-1.jpg","size":451085,"w":700,"h":864,"mime":"image\/jpeg","sizes":{"thumb":{"w":"121","h":"150","target_w":150,"target_h":150,"density":2,"path":"jkt-1-15-1-thumb@2x.jpg","size":13368,"mime":"","assetID":"56"},"w585hc0":{"w":"585","h":"722","target_w":"585","target_h":false,"crop":false,"density":"1","path":"jkt-1-15-1-w585.jpg","size":66312,"mime":"","assetID":"57"},"w800hc0":{"w":"700","h":"864","target_w":"800","target_h":false,"crop":false,"density":"1","path":"jkt-1-15-1-w800.jpg","size":451085,"mime":"","assetID":"58"},"wh72c0":{"w":"58","h":"72","target_w":false,"target_h":"72","crop":false,"density":"1","path":"jkt-1-15-1-h72.jpg","size":1739,"mime":"","assetID":"59"}}}}],"tab_2_subtitle":null,"tab_2_contents":{"_flang":"html","raw":"
\r\n
The Ultra Breeze\u00ae beekeeping jacket includes comfortable veil<\/li>\r\n
3 Layers of ventilated fabric keeps you cool and comfortable<\/li>\r\n
Outstanding sting protection due to depth of fabric and outer mesh layer<\/li>\r\n
Excellent workmanship and made in the USA<\/li>\r\n
Genuine YKK Brass Zippers; 2 chest pockets<\/li>\r\n
Adjustable elasticized wrist brands  and elastic at hips<\/li>\r\n\r\n
Care instructions in FAQs<\/a><\/li><\/ul>","processed":"
\r\n
The Ultra Breeze\u00ae beekeeping jacket includes comfortable veil<\/li>\r\n
3 Layers of ventilated fabric keeps you cool and comfortable<\/li>\r\n
Outstanding sting protection due to depth of fabric and outer mesh layer<\/li>\r\n
Excellent workmanship and made in the USA<\/li>\r\n
Genuine YKK Brass Zippers; 2 chest pockets<\/li>\r\n
Adjustable elasticized wrist brands  and elastic at hips<\/li>\r\n\r\n
Care instructions in FAQs<\/a><\/li><\/ul>"},"tab_3_title":"Size Chart: US","tab_3_contents":{"_flang":"html","raw":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
4' 10 \u2013 5' 0\"\r\n\t<\/td>\r\n\t    \r\n\t\tup to 120\r\n\t<\/td>\r\n\t    \r\n\t\t110\u2013140\r\n\t<\/td>\r\n\t  \r\n\t\t140\u2013160\r\n\t<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 1\" \u2013 5\" 5\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t\tup to 132\r\n\t<\/td>\r\n\t 132\u2013160\r\n\t<\/td>\r\n\t  160\u2013180\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 5\" \u2013 5\" 7\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 170\r\n\t<\/td>\r\n\t 170\u2013190\r\n\t<\/td>\r\n\t  180\u2013200\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  190\u2013220\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
5' 8\" \u2013 5' 10\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  150\u2013190\r\n\t<\/td>\r\n\t  190\u2013225\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  210-260\r\n\t<\/td>\r\n\t   260+\r\n\t<\/td>\r\n<\/tr>\r\n
5' 11\" \u2013 6' 1\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  155\u2013200\r\n\t<\/td>\r\n\t  190\u2013230\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  220\u2013260\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n
6' 2\" \u2013 6' 4\"\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  160\u2013235\r\n\t<\/td>\r\n\t  235\u2013285\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in feet + inches, Weight in pounds<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>","processed":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
4' 10 \u2013 5' 0\"\r\n\t<\/td>\r\n\t    \r\n\t\tup to 120\r\n\t<\/td>\r\n\t    \r\n\t\t110\u2013140\r\n\t<\/td>\r\n\t  \r\n\t\t140\u2013160\r\n\t<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 1\" \u2013 5\" 5\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t\tup to 132\r\n\t<\/td>\r\n\t 132\u2013160\r\n\t<\/td>\r\n\t  160\u2013180\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 5\" \u2013 5\" 7\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 170\r\n\t<\/td>\r\n\t 170\u2013190\r\n\t<\/td>\r\n\t  180\u2013200\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  190\u2013220\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
5' 8\" \u2013 5' 10\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  150\u2013190\r\n\t<\/td>\r\n\t  190\u2013225\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  210-260\r\n\t<\/td>\r\n\t   260+\r\n\t<\/td>\r\n<\/tr>\r\n
5' 11\" \u2013 6' 1\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  155\u2013200\r\n\t<\/td>\r\n\t  190\u2013230\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  220\u2013260\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n
6' 2\" \u2013 6' 4\"\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  160\u2013235\r\n\t<\/td>\r\n\t  235\u2013285\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in feet + inches, Weight in pounds<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>"},"tab_4_title":"Size Chart: International","tab_4_contents":{"_flang":"html","raw":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
147\u2013153<\/td>\r\n\t     \r\n\t\tup to 54<\/td>\r\n\t   50\u201364<\/td>\r\n\t  64\u201374<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
154\u2013163
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t\tup to 60<\/td>\r\n\t    60\u201373<\/td>\r\n\t  72\u201382<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
164\u2013171
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 77<\/td>\r\n\t    77\u201386<\/td>\r\n\t  82\u201391<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  86\u2013100\r\n\t<\/td>\r\n\t   \r\n\t<\/td>\r\n<\/tr>\r\n
172\u2013178
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  68\u201386<\/td>\r\n\t  86\u2013102  <\/td>\r\n\t   \r\n\t<\/td>\r\n\t  95-118<\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n
179\u2013186
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  70\u201391<\/td>\r\n\t  86\u2013104<\/td>\r\n\t \r\n\t<\/td>\r\n\t  100\u2013118<\/td>\r\n\t    118+\r\n\t<\/td>\r\n<\/tr>\r\n
187\u2013193
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  73\u2013107  <\/td>\r\n\t   107\u2013129  <\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in centimeters, Weight in kilograms
<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>","processed":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
147\u2013153<\/td>\r\n\t     \r\n\t\tup to 54<\/td>\r\n\t   50\u201364<\/td>\r\n\t  64\u201374<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
154\u2013163
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t\tup to 60<\/td>\r\n\t    60\u201373<\/td>\r\n\t  72\u201382<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
164\u2013171
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 77<\/td>\r\n\t    77\u201386<\/td>\r\n\t  82\u201391<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  86\u2013100\r\n\t<\/td>\r\n\t   \r\n\t<\/td>\r\n<\/tr>\r\n
172\u2013178
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  68\u201386<\/td>\r\n\t  86\u2013102  <\/td>\r\n\t   \r\n\t<\/td>\r\n\t  95-118<\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n
179\u2013186
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  70\u201391<\/td>\r\n\t  86\u2013104<\/td>\r\n\t \r\n\t<\/td>\r\n\t  100\u2013118<\/td>\r\n\t    118+\r\n\t<\/td>\r\n<\/tr>\r\n
187\u2013193
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  73\u2013107  <\/td>\r\n\t   107\u2013129  <\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in centimeters, Weight in kilograms
<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>"},"productSubTitle":{"_flang":"html","raw":"
 (Includes Hood)<\/p>","processed":"

 (Includes Hood)<\/p>"},"productImage":{"assetID":"48","title":"Jkt crop","_default":"\/perch\/resources\/jktcrop.jpg","bucket":"default","path":"jktcrop.jpg","size":146921,"w":500,"h":670,"mime":"image\/jpeg","sizes":{"thumb":{"w":"111","h":"150","target_w":150,"target_h":150,"density":2,"path":"jktcrop-thumb@2x.jpg","size":12780,"mime":"","assetID":"49"},"w640h640c1":{"w":"477","h":"640","target_w":"640","target_h":"640","crop":"true","density":"1","path":"jktcrop-w640h640.jpg","size":47164,"mime":"","assetID":"50"}}}}
            [productStatus] => Live
            [productCount] => 50
            [productPrice] => 163.00
        )

)

0.0284  0.0001   [1] SELECT optionID, optionKey, optionValues FROM perch2_shop_product_options WHERE productID = 2
0.0286  0.0003   [1] Using template: /templates/shop/product_options.html
0.0293  0.0007  

Size:


0.0294  0.0001   [1] Using template: /templates/shop/product.html
0.0302  0.0008  Rescoping to perch:shop
0.0303  0.0001  Using sub-template: /templates/content/gallery_image.html
0.0304  0.0001  Using sub-template: /templates/shop/product_tab_1.html
0.0305  0.0001  Using sub-template: /templates/shop/inc/table-tab.html
0.0306  0.0001  Using sub-template: /templates/shop/inc/table-tab-int.html
0.0312  0.0006   [nil] SELECT c.*
                    FROM perch2_shop_categories c, perch2_shop_products_to_categories p2c
                    WHERE c.categoryID=p2c.categoryID
                        AND p2c.productID='2'
0.032   0.0008  Using sub-template: /templates/shop/inc/size-pop.html
0.0321  0.0001   [1] Using sub-template: /templates/shop/inc/size-pop.html
0.0377  0.0056   [33] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
0.042   0.0044   [1] SELECT groupID FROM perch2_navigation WHERE groupSlug='footer' LIMIT 1
0.0422  0.0002   [1] SELECT np.pageID, np.pageParentID, np.pageDepth, np.pageTreePosition
                        FROM perch2_navigation_pages np, perch2_pages p
                        WHERE p.pageID=np.pageID AND np.groupID=2 AND (p.pagePath='/dev' OR p.pageSortPath='/dev') LIMIT 1
0.0424  0.0002   [2] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes
                    FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=2 AND p.pageNew=0  ORDER BY np.pageTreePosition ASC
0.0425  0.0002   [0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=2 AND p.pagePath='/shop/product.php' LIMIT 1
0.0427
Drew McLellan

Drew McLellan 2638 points
Perch Support

Each Using template: line shows you which templates are being used.

Drew McLellan said:

Each Using template: line shows you which templates are being used.

The templates listed are the same in both cases. This is the Debug code for the page when I don't try to specify a template:

Debug Message
[33] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT * FROM perch2_shop_products WHERE productStatus='Live' AND productSlug= 'ultra-breeze-jacket'
[nil] SELECT categoryID FROM perch2_shop_products_to_categories WHERE productID = '2'
[1] SELECT * FROM perch2_pages WHERE pagePath='/shop/product.php' LIMIT 1
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Discount Code' AND (regionPage='/shop/product.php' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=42 AND idx.itemRev=2)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/text.html
Using template: /templates/search/search-form.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='page-top' LIMIT 1
[9] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=1 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
[0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=1 AND p.pagePath='/shop/product.php' LIMIT 1
Using template: /templates/navigation/ubs-top.html
[6] Using template: /templates/navigation/item.html
[1] SELECT p.* FROM perch2_shop_products p WHERE productStatus='Live' AND productSlug='ultra-breeze-jacket'
Array
(
    [0] => Array
        (
            [productID] => 2
            [productCode] => ubs-jkt
            [productTitle] => Ultra Breeze Jacket
            [productSlug] => ultra-breeze-jacket
            [productDescRaw] => 
3 layers of ventilated fabric keep you cool and protected.
Roomy hood stays in place and off your face.
Made in the USA.

            [productDescHTML] => 
3 layers of ventilated fabric keep you cool and protected.
Roomy hood stays in place and off your face.
Made in the USA.

            [productDynamicFields] => {"productOptions_html":null,"ubs_gallery_images":[{"lg_image":{"assetID":"55","title":"Jkt 1 15","_default":"\/perch\/resources\/jkt-1-15-1.jpg","bucket":"default","path":"jkt-1-15-1.jpg","size":451085,"w":700,"h":864,"mime":"image\/jpeg","sizes":{"thumb":{"w":"121","h":"150","target_w":150,"target_h":150,"density":2,"path":"jkt-1-15-1-thumb@2x.jpg","size":13368,"mime":"","assetID":"56"},"w585hc0":{"w":"585","h":"722","target_w":"585","target_h":false,"crop":false,"density":"1","path":"jkt-1-15-1-w585.jpg","size":66312,"mime":"","assetID":"57"},"w800hc0":{"w":"700","h":"864","target_w":"800","target_h":false,"crop":false,"density":"1","path":"jkt-1-15-1-w800.jpg","size":451085,"mime":"","assetID":"58"},"wh72c0":{"w":"58","h":"72","target_w":false,"target_h":"72","crop":false,"density":"1","path":"jkt-1-15-1-h72.jpg","size":1739,"mime":"","assetID":"59"}}}}],"tab_2_subtitle":null,"tab_2_contents":{"_flang":"html","raw":"
\r\n
The Ultra Breeze\u00ae beekeeping jacket includes comfortable veil<\/li>\r\n
3 Layers of ventilated fabric keeps you cool and comfortable<\/li>\r\n
Outstanding sting protection due to depth of fabric and outer mesh layer<\/li>\r\n
Excellent workmanship and made in the USA<\/li>\r\n
Genuine YKK Brass Zippers; 2 chest pockets<\/li>\r\n
Adjustable elasticized wrist brands  and elastic at hips<\/li>\r\n\r\n
Care instructions in FAQs<\/a><\/li><\/ul>","processed":"
\r\n
The Ultra Breeze\u00ae beekeeping jacket includes comfortable veil<\/li>\r\n
3 Layers of ventilated fabric keeps you cool and comfortable<\/li>\r\n
Outstanding sting protection due to depth of fabric and outer mesh layer<\/li>\r\n
Excellent workmanship and made in the USA<\/li>\r\n
Genuine YKK Brass Zippers; 2 chest pockets<\/li>\r\n
Adjustable elasticized wrist brands  and elastic at hips<\/li>\r\n\r\n
Care instructions in FAQs<\/a><\/li><\/ul>"},"tab_3_title":"Size Chart: US","tab_3_contents":{"_flang":"html","raw":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
4' 10 \u2013 5' 0\"\r\n\t<\/td>\r\n\t    \r\n\t\tup to 120\r\n\t<\/td>\r\n\t    \r\n\t\t110\u2013140\r\n\t<\/td>\r\n\t  \r\n\t\t140\u2013160\r\n\t<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 1\" \u2013 5\" 5\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t\tup to 132\r\n\t<\/td>\r\n\t 132\u2013160\r\n\t<\/td>\r\n\t  160\u2013180\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 5\" \u2013 5\" 7\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 170\r\n\t<\/td>\r\n\t 170\u2013190\r\n\t<\/td>\r\n\t  180\u2013200\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  190\u2013220\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
5' 8\" \u2013 5' 10\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  150\u2013190\r\n\t<\/td>\r\n\t  190\u2013225\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  210-260\r\n\t<\/td>\r\n\t   260+\r\n\t<\/td>\r\n<\/tr>\r\n
5' 11\" \u2013 6' 1\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  155\u2013200\r\n\t<\/td>\r\n\t  190\u2013230\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  220\u2013260\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n
6' 2\" \u2013 6' 4\"\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  160\u2013235\r\n\t<\/td>\r\n\t  235\u2013285\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in feet + inches, Weight in pounds<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>","processed":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
4' 10 \u2013 5' 0\"\r\n\t<\/td>\r\n\t    \r\n\t\tup to 120\r\n\t<\/td>\r\n\t    \r\n\t\t110\u2013140\r\n\t<\/td>\r\n\t  \r\n\t\t140\u2013160\r\n\t<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 1\" \u2013 5\" 5\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t\tup to 132\r\n\t<\/td>\r\n\t 132\u2013160\r\n\t<\/td>\r\n\t  160\u2013180\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
\r\n\t\t5' 5\" \u2013 5\" 7\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 170\r\n\t<\/td>\r\n\t 170\u2013190\r\n\t<\/td>\r\n\t  180\u2013200\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  190\u2013220\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
5' 8\" \u2013 5' 10\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  150\u2013190\r\n\t<\/td>\r\n\t  190\u2013225\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  210-260\r\n\t<\/td>\r\n\t   260+\r\n\t<\/td>\r\n<\/tr>\r\n
5' 11\" \u2013 6' 1\"\r\n\t<\/td>\r\n\t \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  155\u2013200\r\n\t<\/td>\r\n\t  190\u2013230\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  220\u2013260\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n
6' 2\" \u2013 6' 4\"\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  160\u2013235\r\n\t<\/td>\r\n\t  235\u2013285\r\n\t<\/td>\r\n\t  260+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in feet + inches, Weight in pounds<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>"},"tab_4_title":"Size Chart: International","tab_4_contents":{"_flang":"html","raw":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
147\u2013153<\/td>\r\n\t     \r\n\t\tup to 54<\/td>\r\n\t   50\u201364<\/td>\r\n\t  64\u201374<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
154\u2013163
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t\tup to 60<\/td>\r\n\t    60\u201373<\/td>\r\n\t  72\u201382<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
164\u2013171
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 77<\/td>\r\n\t    77\u201386<\/td>\r\n\t  82\u201391<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  86\u2013100\r\n\t<\/td>\r\n\t   \r\n\t<\/td>\r\n<\/tr>\r\n
172\u2013178
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  68\u201386<\/td>\r\n\t  86\u2013102  <\/td>\r\n\t   \r\n\t<\/td>\r\n\t  95-118<\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n
179\u2013186
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  70\u201391<\/td>\r\n\t  86\u2013104<\/td>\r\n\t \r\n\t<\/td>\r\n\t  100\u2013118<\/td>\r\n\t    118+\r\n\t<\/td>\r\n<\/tr>\r\n
187\u2013193
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  73\u2013107  <\/td>\r\n\t   107\u2013129  <\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in centimeters, Weight in kilograms
<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>","processed":"\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t
Sizing\r\n\t<\/th>\r\n\t    \r\n\t\tX Small\r\n\t<\/th>\r\n\t   \r\n\t\tSmall\r\n\t<\/th>\r\n\t \r\n\t\tMedium\r\n\t<\/th>\r\n\t    \r\n\t\tLarge\r\n\t<\/th>\r\n\t 1X\r\n\t<\/th>\r\n\t    1X Tall\r\n\t<\/th>\r\n\t   2X\r\n\t<\/th>\r\n\t    3X\r\n\t<\/th>\r\n<\/tr>\r\n<\/thead>\r\n
\r\n\t\tHeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n\t    \r\n\t\tWeight\r\n\t<\/td>\r\n<\/tr>\r\n
147\u2013153<\/td>\r\n\t     \r\n\t\tup to 54<\/td>\r\n\t   50\u201364<\/td>\r\n\t  64\u201374<\/td>\r\n\t  \r\n\t\t
\r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
154\u2013163
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t\tup to 60<\/td>\r\n\t    60\u201373<\/td>\r\n\t  72\u201382<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n<\/tr>\r\n
164\u2013171
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  up to 77<\/td>\r\n\t    77\u201386<\/td>\r\n\t  82\u201391<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  86\u2013100\r\n\t<\/td>\r\n\t   \r\n\t<\/td>\r\n<\/tr>\r\n
172\u2013178
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  68\u201386<\/td>\r\n\t  86\u2013102  <\/td>\r\n\t   \r\n\t<\/td>\r\n\t  95-118<\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n
179\u2013186
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  70\u201391<\/td>\r\n\t  86\u2013104<\/td>\r\n\t \r\n\t<\/td>\r\n\t  100\u2013118<\/td>\r\n\t    118+\r\n\t<\/td>\r\n<\/tr>\r\n
187\u2013193
<\/td>\r\n\t    \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  \r\n\t<\/td>\r\n\t  73\u2013107  <\/td>\r\n\t   107\u2013129  <\/td>\r\n\t  118+\r\n\t<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n
Note: Height in centimeters, Weight in kilograms
<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>"},"productSubTitle":{"_flang":"html","raw":"
 (Includes Hood)<\/p>","processed":"

 (Includes Hood)<\/p>"},"productImage":{"assetID":"48","title":"Jkt crop","_default":"\/perch\/resources\/jktcrop.jpg","bucket":"default","path":"jktcrop.jpg","size":146921,"w":500,"h":670,"mime":"image\/jpeg","sizes":{"thumb":{"w":"111","h":"150","target_w":150,"target_h":150,"density":2,"path":"jktcrop-thumb@2x.jpg","size":12780,"mime":"","assetID":"49"},"w640h640c1":{"w":"477","h":"640","target_w":"640","target_h":"640","crop":"true","density":"1","path":"jktcrop-w640h640.jpg","size":47164,"mime":"","assetID":"50"}}}}
            [productStatus] => Live
            [productCount] => 50
            [productPrice] => 163.00
        )

)

 [1] SELECT optionID, optionKey, optionValues FROM perch2_shop_product_options WHERE productID = 2
 [1] Using template: /templates/shop/product_options.html


Size:


 [1] Using template: /templates/shop/product.html
Rescoping to perch:shop
Using sub-template: /templates/content/gallery_image.html
Using sub-template: /templates/shop/product_tab_1.html
Using sub-template: /templates/shop/inc/table-tab.html
Using sub-template: /templates/shop/inc/table-tab-int.html
 [nil] SELECT c.*
                    FROM perch2_shop_categories c, perch2_shop_products_to_categories p2c
                    WHERE c.categoryID=p2c.categoryID
                        AND p2c.productID='2'
Using sub-template: /templates/shop/inc/size-pop.html
 [1] Using sub-template: /templates/shop/inc/size-pop.html
 [33] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
 [1] SELECT groupID FROM perch2_navigation WHERE groupSlug='footer' LIMIT 1
 [1] SELECT np.pageID, np.pageParentID, np.pageDepth, np.pageTreePosition
                        FROM perch2_navigation_pages np, perch2_pages p
                        WHERE p.pageID=np.pageID AND np.groupID=2 AND (p.pagePath='/dev' OR p.pageSortPath='/dev') LIMIT 1
 [2] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes
                    FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=2 AND p.pageNew=0  ORDER BY np.pageTreePosition ASC
 [0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=2 AND p.pagePath='/shop/product.php' LIMIT 1
 [2] Using template: /templates/navigation/ftr.html

I'm still not seeing any difference.

Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you setting the template? The only example you've shown has the option commented out.

Drew McLellan said:

How are you setting the template? The only example you've shown has the option commented out.>

I've tried all of these individually:

<?php
 perch_shop_product(perch_get('s'), [
      'template' => 'shop/product.html',
  ]);
 ?>

 <?php
  perch_shop_product(perch_get('s'), [
       'template' => '/templates/shop/product.html',
   ]);
  ?>

  <?php
   perch_shop_product(perch_get('s'), [
        'template' => 'product.html',
    ]);
   ?>

   <?php
    perch_shop_product(perch_get('s'), array(
         'template' => 'shop/product.html',
     ));
    ?>
    <?php
    perch_shop_product(perch_get('s'), array(
         'template' => '/templates/shop/product.html',
     ));
    ?>
    <?php
    perch_shop_product(perch_get('s'), array(
         'template' => 'product.html',
     ));
    ?>

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Kyle,

If you are using Perch's default templates for the Shop App, I believe the default file is /perch/templates/shop/products/product.html.

I think perch_shop_product() looks at /perch/templates/shop by default when you use the template option, so you still have to specify sub-directories:

perch_shop_product(perch_get('s'), [
    'template' => 'products/product.html'
]);

Hussein Al Hammad said:

Hello Kyle,

If you are using Perch's default templates for the Shop App, I believe the default file is /perch/templates/shop/products/product.html.

I think perch_shop_product() looks at /perch/templates/shop by default when you use the template option, so you still have to specify sub-directories:

perch_shop_product(perch_get('s'), [
   'template' => 'products/product.html'
]);

HI Hussein, My product.html template is directly within the shop template folder (no subdirectory). So from what you're saying this should have worked:

<?php
perch_shop_product(perch_get('s'), [
'template' => 'product.html',
]);
?>

but it doesn't.

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Umm, plus the debug message would tell you if the template couldn't be found. So I guess this rules out an incorrect path.

Can you show us your template?

Hussein Al Hammad said:

Can you show us your template?

Absolutely. This is product.html:

<!-- start of product.html tabs -->
<nav role="tablist" class="tabs <perch:content id='discount_code' />">
            <a role="tab" href="#tab-1" class="tab tabber-handle" title="">Product Overview</a>
            <a role="tab" href="#tab-2" class="tab tabber-handle" title="">Additional Details</a>
            <perch:if exists="tab_3_title"><a  role="tab" href="#size-us" class="tab tabber-handle" title="Size Chart: US"><perch:shop id="tab_3_title" type="text" label="Tab 3 Heading" order="12" help="Enter a title for the 3rd tab: Tab will be hidden if blank" divider-before="Tab 3" /></a></perch:if>
            <perch:if exists="tab_4_title"><a role="tab" href="#size-int" class="tab tabber-handle" title=""><perch:shop id="tab_4_title" type="text" label="Tab 4 Heading" order="14" help="Enter a title for the 4th tab: Tab will be hidden if blank" divider-before="Tab 4" /></a></perch:if>
        </nav>
        <div id="tabs_container" class="grid-100 tablet-grid-100 mobile-grid-100 grid-parent">
<!-- // start of product.html tabs -->
<div role="tabpanel" id="tab-1" class="tab-box tabber-tab panel grid-100 tablet-grid-100 mobile-grid-100">
  <!--tab content-->
<section class="product-photos grid-40 tablet-grid-40 mobile-grid-40 clearfix">
         <perch:template path="content/gallery_image.html" rescope="parent"/>
</section>
<!-- .photos -->

    <section class="order-info grid-25 tablet-grid-25 mobile-grid-60 tablet-push-35 push-35">

<h4 itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="price">Price: <span itemprop="price">&#36;<perch:shop id="productPrice" /></span></h4>
        <perch:shop id="productDescHTML" encode="false" suppress="true" type="textarea" editor="redactor" html="true" />


    <perch:form id="_xclick" method="post" action="https://www.paypal.com/cgi-bin/webscr">
        <perch:input type="hidden" name="business" value="<perch:setting id="perch_shop_paypal_email" />" />
        <perch:input type="hidden" name="currency_code" value="USD" />
        <perch:input type="hidden" name="cmd" value="_cart" />
        <perch:input type="hidden" name="add" value="1" />
    <perch:input type="hidden" name="item_name" value="<perch:shop id="productTitle" />" />
    <perch:input type="hidden" name="amount" value="<perch:shop id="productPrice" />" />
    <perch:input type="hidden" name="lc" value="US">
    <perch:input type="hidden" name="button_subtype" value="products">
    <perch:input type="hidden" name="no_note" value="0">
    <perch:input type="hidden" name="shipping" value="0.00">
    <perch:input type="hidden" name="bn" value="PP-ShopCartBF">
    <perch:input type="hidden" name="undefined_quantity" value="1">


    <perch:if exists="productOptions_html"><perch:shop id="productOptions_html" encode="false" type="select" options="" order="5"  /></perch:if>

        <section class="grid-100 tablet-grid-100 mobile-grid-100 grid-parent atc-container"><div class="grid-30 tablet-grid-30 mobile-grid-30  grid-parent"><label for="quantity">Qty:</label>
<input name="quantity" id="quantity" class="qty" type="number" min="1" value="1" /></div>
<div class="grid-60 prefix-10 tablet-grid-60 tablet-prefix-10 mobile-grid-60 mobile-prefix-10 grid-parent"><perch:input type="submit" class="atc-btn" name="add" value="Add to cart" /> </div></section>
<!-- / qty-atc -->
        </perch:form>
    <perch:if exists="productOptions_html">
    <a class="sizeInfo-pop" href="javascript:;" data-dialogmodal-bind="#ubs_sizing-guidance" data-ondocumentclick-close="true" data-topoffset="0" data-top="10%"   data-ondocumentclick-close-prevent="" data-type="modal">view sizing guidance</a><p>For general advice about selecting a size, click <b>View Sizing Guidance</b> above.</p><ul class="size-links">
      <li><a href="#size-us"><b>Size Chart: US</b></a></li><li><a href="#size-int"><b>Size Chart: International</b></a></li>
    </ul></perch:if>
        </section>
<!-- .order-info -->

<section class="product-overview-text grid-35 tablet-grid-35 mobile-grid-60 tablet-pull-25 pull-25">
        <perch:template path="shop/product_tab_1.html" />
</section>
                 <!-- text -->
</div><!-- // tab 1 content-->
<div role="tabpanel" id="tab-2" class="panel tab-box tabber-tab grid-100 tablet-grid-100 mobile-grid-100">
<div class="grid-100 tablet-grid-100 mobile-grid-100">
       <!--tab content-->
       <h3><perch:if exists="tab_2_subtitle"><perch:shop id="tab_2_subtitle" type="text" label="Tab 2 Heading" order="10" help="Enter a heading for the 2nd tab. If left blank, will default to 'Additional Details'" /><perch:else />Additional Details</perch:if></h3>
       <perch:if exists="tab_2_contents"><perch:shop id="tab_2_contents" type="textarea" editor="redactor" html="true" order="11" label="Tab 2 Contents" encode="false" />
       <perch:else /><p>This is where more details would go</p></perch:if></div>
</div><perch:if exists="tab_3_title">
<div role="tabpanel" id="size-us" class="panel size-chart tab-box tabber-tab grid-100 tablet-grid-100 mobile-grid-100">
  <perch:template path="shop/inc/table-tab.html" />

        <perch:shop id="tab_3_contents" type="textarea" editor="redactor" html="true" order="13" label="Tab 3 Contents"  suppress="true" />
</div><!--End tab-3 container-->
</perch:if>

<perch:if exists="tab_4_title">
<div role="tabpanel" id="size-int" class="panel size-chart tab-box tabber-tab grid-100 tablet-grid-100 mobile-grid-100">
  <perch:template path="shop/inc/table-tab-int.html" />

        <perch:shop id="tab_4_contents" type="textarea" editor="redactor" html="true" order="14" label="Tab 4 Contents"  suppress="true" />

</div><!--End tab-4 container-->
</perch:if>
 </div><!--End tabs container-->
<!-- // end of product.html -->
Drew McLellan

Drew McLellan 2638 points
Perch Support

What path is this saved as?

Drew McLellan said:

What path is this saved as?

public_html/perch/templates/shop/product.html

Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks correct to me.

Drew McLellan said:

That looks correct to me.

That's why I posted here. Is there a way to use another function similar to perch_layout to achieve the same thing? I know perch_layout is working for pulling in the global templates, I just don't know if there's another way I could code it.

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Looking at your template I see you haven't self-closed several <perch:input /> tags:

<perch:input type="hidden" name="lc" value="US">
<perch:input type="hidden" name="button_subtype" value="products">
<perch:input type="hidden" name="no_note" value="0">
<perch:input type="hidden" name="shipping" value="0.00">
<perch:input type="hidden" name="bn" value="PP-ShopCartBF">
<perch:input type="hidden" name="undefined_quantity" value="1">

Hussein Al Hammad said:

Looking at your template I see you haven't self-closed several <perch:input /> tags:

I closed all tags and same issue. I've also replaced the perch_shop_paypal (1.2.3) app with a fresh version and tried removing everything from the product.html template except an HTML comment and tried all paths above. Still nothing.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah, I didn't realise you were on the old PayPal Shop app, not Perch Shop. That app is deprecated and no longer supported.

Drew McLellan said:

Ah, I didn't realise you were on the old PayPal Shop app, not Perch Shop.

It was in my diagnostics report in the very first post. Sorry for the inconvenience.