Thread tagged as: Question, Problem, FoxyCart

shop foxycart app

I acknowledge that foxycart is deprecated but I have latest version of perch and perch_shop_foxycart following recent update/upgrade

While user can see and edit current stock user cannot add new products - when click save just get error message 'Sorry, that product could not be updated.' Same story when logged in as admin.

Any ideas?

Summary information
Perch: 2.8.32, PHP: 5.6.26, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_blog (5.0), perch_shop_foxycart (2.1), perch_upgrade (1.6)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_shop_foxycart', 'perch_blog', 'perch_upgrade', );
PERCH_PATH: /var/www/web/perch
PERCH_CORE: /var/www/web/perch/core
PERCH_RESFILEPATH: /var/www/web/perch/resources
Image manipulation: GD 
PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M
F1: 2edba60ed1f613d6dd804feb202456a2 
Resource folder writeable: Yes
DOCUMENT_ROOT: /var/www/web
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/

Charlie Elsey

Charlie Elsey 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You should turn on debug and check for any errors at the point you get that message.

Debug reveals this invalid query... what to do?

INSERT INTO perch2_shop_products(productTitle,productDescRaw,productCount,productStatus,productPrice,productFoxyCategory,productCode,productCountByOptions,productPriceByOptions,productDynamicFields,productDescHTML,productSlug) VALUES('new test product','<p>tester</p>','10','Live','100','','1254',0,0,'{\"image_1\":null,\"image_2\":null,\"image_3\":null,\"image_4\":null,\"image_5\":null,\"image_6\":null,\"dimensions\":null,\"order\":null,\"sold\":null}','<p>tester</p>','new-test-product') 
Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'productCountByOptions' in 'field list' 
Drew McLellan

Drew McLellan 2638 points
Perch Support

When did this start?

Drew McLellan said:

When did this start?

since the upgrade.

you may recall user had some issues not seeing anything at all, so been concentrating on that. your advice below sorted all that out

If it's the same database, drop those empty perch2_shop* tables and rename the old perch_shop* tables to use a perch2_ prefix.
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.

so looking at 'old' version 1 database tables and 'new' version 2 database there are an additional two fields required for version 2, productCountByOptions and productPriceByOptions

If I just add those will that sort matters? do you think?

edit: adding these fields/columns fixed the issue

Drew McLellan

Drew McLellan 2638 points
Perch Support

Sorry, I thought you were saying it was sorted.

Yes, adding those fields should do it.