Forum

Thread tagged as: Question, Shop

Help a n00b with the shop app.

I have this site running and am trying to create a shop for it. Is there a complete set of documentation that I am missing somehow? I feel like I am missing some steps. I have installed shop and members app, but no payment info is showing up in settings.

Here is my shop page with two products on it. These products have info and images attached, nut if you click the item or add to cars you go to a blank page: https://www.piratesofthecarabina.com/shop/

in my shop/index.php file I have:

<?php perch_content('shop'); ?> <?php perch_shop_products(); ?>

and then thanks to a forum member I have a product.php page containing this:

<?php perch_shop_product(perch_get('s')); ?>

plus added this to template: <a href="/shop/product.php?s=<perch:shop id="slug" type="slug" />/">

Is there a video somewhere that walks a new user through this? Thanks

James Loudon

James Loudon 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

One thing at a time. Can you post your diagnostics report?

Your product detiail page looks ok, you just need to remove the trailing slash from the link.

https://www.piratesofthecarabina.com/shop/product.php?s=zebra

Thanks Drew. How is that trailing slash getting in there? I see from that resultant page there is still a path error as the image is not displaying.

here is diags:

Perch: 2.8.29, PHP: 7.0.14, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (5.0), perch_forms (1.8.3), perch_gallery (2.8.6), perch_shop_orders (1.0.4), perch_shop_products (1.0.4), perch_shop (1.0.4), perch_members (1.5), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_gallery', 'perch_forms', 'perch_members', 'perch_shop', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/piratesofthecarabina.com/httpdocs/perch
PERCH_CORE: /var/www/vhosts/piratesofthecarabina.com/httpdocs/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/piratesofthecarabina.com/httpdocs/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 2M, Max POST 8M, Memory: 64M, Total max file upload: 2M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /var/www/vhosts/piratesofthecarabina.com/httpdocs
HTTP_HOST: www.piratesofthecarabina.com
Drew McLellan

Drew McLellan 2638 points
Perch Support

plus added this to template: <a href="/shop/product.php?s=<perch:shop id="slug" type="slug" />/">

It's right there in your template.

Gotcha- just spotted that. Okay its gone and now page displays, but without images and no cart. Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so what can you tell me to help?

Well I need to know what I have missed out, what code should be on my cart page apart from what I have - and why the product page is incomplete. Hows the report look? I found a thread somewhere inthe forum that suggested I had to install a feather, butr that was not included in the shop download. Thanks J

Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you have on your cart page?

<?php perch_content('cart'); ?>

<?php perch_shop_cart([ 'template' => 'cart/mini-cart.html', ]); ?>

So Icreated a region then chose the cart.html template which I have copied over to perch/templates/content

Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like there's a redirect happening when you post to the cart page. You might want to disable your rewrite rules temporarily so that you can isolate your problems.