Forum

Thread tagged as: Shop

problem with perch_shop_product()

Hi,

spend hours trying to fix an issue i have..

I can't get any put using perch_shop_product('test3-lms0003');

if I call perch_shop_product() with now product slug, it lists all the products (with warning) with slug I used!

what am i doing wrong?

tony


Warning: Missing argument 1 for perch_shop_product(), called in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/single.php on line 178 and defined in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop/runtime/products.php on line 24 Notice: Undefined variable: slug in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop/runtime/products.php on line 32 LMS0003 Peach & grey floral dress set test3-lms0003 This outfit is ideal outfit for a party or a special occasion. The 3 piece set includes a dress, jacket and leggings. The dress features a round neckline with diamantes around the neckline, grey waistband with crystals on and 3d flower motifs, pleats on the skirt part of the dress and a zip fastening on the back. The leggings have rouched bottoms with peach buttons on. The jacket is cropped with long sleeves and a grey trimmed edge. This outfit is ideal outfit for a party or a special occasion. The 3 piece set includes a dress, jacket and leggings. Material: 95% Polyester 5% Elastane. Care instructions: Wash 30 degrees. Do not bleach. Do not tumble dry. Professional dry clean. Iron low heat. /perch/resources/peachemilyfront2-h750-h1200.jpg /perch/resources/peachemilyfront2-h750-h800.jpg /perch/resources/peachemilyfront2-h750-h375.jpg /perch/resources/peachemilyfront2-h750-w80h80@1.6x.jpg /perch/resources/peachside-h1200-w1200.jpg /perch/resources/peachside-h1200-h800.jpg /perch/resources/peachside-h1200-h375.jpg /perch/resources/peachside2-h1200-w1200.jpg /perch/resources/peachside2-h1200-h800.jpg /perch/resources/peachside2-h1200-h375.jpg 1 Little Stylish Me Girls (2-14 years) 0 £9.99 £4.99 UK In Stock 5 0 3 1 .6 25 25 5
Tony Monckton

Tony Monckton 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We need your Diagnostics Report and your code in order to be able to help.

            PerchUtil::output_debug();

            perch_shop_product("test3-lms0003");

diagnostics:

Perch: 2.8.30
Production mode: Production (100)
Installed apps: content (2.8.30), assets (2.8.30), categories (2.8.30), perch_blog (5.0), perch_shop_orders (PERCH_SHOP_VERSION), perch_shop_products (1.0.6), perch_shop (1.0.6), perch_members (1.5)
DB driver: PDO
DB tables: perch2_categories (20), perch2_category_counts (0), perch2_category_sets (1), perch2_content_index (33), perch2_content_items (15), perch2_content_regions (4), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (0), perch2_pages (1), perch2_resource_log (52), perch2_resource_tags (0), perch2_resources (47), perch2_resources_to_tags (0), perch2_settings (30), perch2_shop_addresses (0), perch2_shop_admin_index (28), perch2_shop_brands (1), perch2_shop_cart (22), perch2_shop_cart_data (0), perch2_shop_cart_items (0), perch2_shop_countries (250), perch2_shop_currencies (152), perch2_shop_customers (0), perch2_shop_emails (1), perch2_shop_index (330), perch2_shop_option_values (3), perch2_shop_options (1), perch2_shop_order_items (0), perch2_shop_order_promotions (0), perch2_shop_order_statuses (9), perch2_shop_orders (0), perch2_shop_orders_meta (1), perch2_shop_product_files (0), perch2_shop_product_option_values (3), perch2_shop_product_options (3), perch2_shop_product_tags (0), perch2_shop_products (6), perch2_shop_promotions (0), perch2_shop_search (5), perch2_shop_shipping_zone_countries (1), perch2_shop_shipping_zones (1), perch2_shop_shippings (1), perch2_shop_tax_exhibits (0), perch2_shop_tax_group_rates (0), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (1), perch2_shop_variants (4), perch2_user_passwords (0), perch2_user_privileges (64), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (2)
Users: 2
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_blog',
        'perch_members',
        'perch_shop',
    );
?>
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: b95549e023a1e8891b21845e5a4bdae5
L1: 15df4da316a6b61570fd981038ecd532
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.30: done
latest_version: 2.8.15
on_sale_version: 2.8.31
perch_shop_update: 1.0.6
headerScheme: light
perch_blog_site_name:
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: exc
perch_shop_site_url: https://
perch_shop_product_url: /shop/products/{slug}
perch_shop_default_currency: 47
perch_shop_reporting_currency: 47
perch_shop_invoice_number_format: Invoice%d
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
logoPath: /perch/resources/little-stylish-me-logo.png
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: db78335_tony
PERCH_DB_SERVER: internal-db.s78335.gridserver.com
PERCH_DB_DATABASE: db78335_littleme
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/London
PERCH_EMAIL_FROM: tony@pupletang.co.uk
PERCH_EMAIL_FROM_NAME: Tony Monckton
PERCH_LOGINPATH: /perch
PERCH_PATH: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch
PERCH_CORE: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/core
PERCH_RESFILEPATH: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
PERCH_SHOP_VERSION: 1.0.6
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile
HOSTING SETTINGS

PHP: 5.5.35
Zend: 2.5.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.49
MySQL server: 5.1.63-rel13.4
Free disk space: 3.60 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, ldap, mbstring, mcrypt, standard, mysqlnd, mysqli, mysql, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 20M
PHP max form post size: 20M
PHP memory limit: 2048M
Total max uploadable file size: 20M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PATH: /usr/local/bin:/usr/bin:/bin
REDIRECT_HANDLER: php-latest
REDIRECT_STATUS: 200
UNIQUE_ID: V4pQOUYgRB4AACMZPXYAAAA6
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_URI: https://shop.stylishlittleme.com/perch/core/settings/diagnostics/
WM_UCONTROL_XMLRPC_SERVER: https://10.0.0.13
ACCESS_DOMAIN: s78335.gridserver.com
DATABASE_SERVER: internal-db.s78335.gridserver.com
SITE_ROOT: /home/78335
SITE_CGIROOT: /home/78335/cgi-bin
SITE_HTMLROOT: /home/78335/domains/shop.stylishlittleme.com/html
PHPRC: /home/78335/etc/
HTTP_HOST: shop.stylishlittleme.com
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: PHPSESSID=47b1796e1d6848d7a5c529dbb6c7d879; cmsa=1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_REFERER: https://shop.stylishlittleme.com/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
SERVER_SIGNATURE: <address>Apache/2.2.22 Server at shop.stylishlittleme.com Port 80</address>
SERVER_SOFTWARE: Apache/2.2.22
SERVER_NAME: shop.stylishlittleme.com
SERVER_ADDR: 70.32.68.91
SERVER_PORT: 80
REMOTE_ADDR: 86.181.160.192
DOCUMENT_ROOT: /home/78335/domains/shop.stylishlittleme.com/html
SERVER_ADMIN: webmaster@shop.stylishlittleme.com
SCRIPT_FILENAME: /home/78335/domains/shop.stylishlittleme.com/html/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 57075
REDIRECT_QUERY_STRING: extended
REDIRECT_URL: /perch/core/settings/diagnostics/index.php
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /etc/apache2/gs-bin/php-latest
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
ORIG_PATH_TRANSLATED: /home/78335/domains/shop.stylishlittleme.com/html/perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_NAME: /gs-bin/php-latest
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1468682297.9702
REQUEST_TIME: 1468682297
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

This looks to be correct:

perch_shop_product("test3-lms0003");

I created a new product, and it works???

very strange

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, how can I help?

all fixed thanks

tony