We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Shop

return-html with perch_shop_cart()

Hello,

I'm trying to use the return-html option with perch_shop_cart(). The option is listed in the function's documentation. However, the HTML isn't being added to the returned array.

$cart = perch_shop_cart([
    'template' => 'cart/cart',
    'skip-template' => true,
    'return-html' => true,
]);

// undefined index
echo $cart['html'];

Diagnostic:

Perch Runway: 3.0.12, PHP: 7.1.11, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (3.0.12), assets (3.0.12), categories (3.0.12), perch_blog (5.6.1), perch_forms (1.10), perch_shop_orders (1.2.5), perch_shop_products (1.2.5), perch_shop (1.2.5), perch_members (1.6.2), pipit_catalog (1.1.0), pipit_sharing (1.0.0)
App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_members', 'perch_shop', 'perch_forms', 'pipit_sharing', ];
PERCH_LOGINPATH: /perch
PERCH_PATH: D:\Work\git\131-atb-guitars-website\public\perch
PERCH_CORE: D:\Work\git\131-atb-guitars-website\public\perch\core
PERCH_RESFILEPATH: D:\Work\git\131-atb-guitars-website\public\perch\resources
Image manipulation: GD
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: dev.atbguitars.com
DOCUMENT_ROOT: D:/Work/git/131-atb-guitars-website/public
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Hussein Al Hammad

Hussein Al Hammad 105 points

  • 1 year ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I think that's an error in the documentation - that option isn't implemented.

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Ah I see! I can work without it for now.

Thanks Drew