1999 Posts in 530 Topics by 433 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » Error on check out
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 865 Views |
-
Error on check out

15 July 2010 at 11:18am
Hey all,
Anyone experienced an error after submitting the order form?
Maybe I don't have my configuration set up correctly, getting it on two different set ups. The error isn't too helpfulWebsite Error
There has been an errorThe website server has not been able to respond to your request.
-
Re: Error on check out

15 July 2010 at 1:53pm
Setting the site to dev mode revealed the sql error
Looks like its happening inside the recalculate_numbersold() function around line 114 of Product.php
[User Error] Couldn't run query: SELECT "SiteTree"."ClassName", "SiteTree"."Created", "SiteTree"."LastEdited", "SiteTree"."URLSegment", "SiteTree"."Title", "SiteTree"."MenuTitle", "SiteTree"."Content", "SiteTree"."MetaTitle", "SiteTree"."MetaDescription", "SiteTree"."MetaKeywords", "SiteTree"."ExtraMeta", "SiteTree"."ShowInMenus", "SiteTree"."ShowInSearch", "SiteTree"."HomepageForDomain", "SiteTree"."ProvideComments", "SiteTree"."Sort", "SiteTree"."HasBrokenFile", "SiteTree"."HasBrokenLink", "SiteTree"."Status", "SiteTree"."ReportClass", "SiteTree"."CanViewType", "SiteTree"."CanEditType", "SiteTree"."ToDo", "SiteTree"."Version", "SiteTree"."Priority", "SiteTree"."ParentID", "Page"."SubMenu", "Page"."PlaceInFooter", "Product"."Price", "Product"."Weight", "Product"."Model", "Product"."FeaturedProduct", "Product"."AllowPurchase", "Product"."InternalItemID", "Product"."NumberSold", "Product"."ImageID", "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", SUM(OrderItem.Quantity) AS NewNumberSold FROM "SiteTree" LEFT JOIN "Page" ON "Page"."ID" = "SiteTree"."ID" LEFT JOIN "Product" ON "Product"."ID" = "SiteTree"."ID" LEFT JOIN "Product_OrderItem" ON Product.ID = Product_OrderItem.ProductID LEFT JOIN "OrderItem" ON Product_OrderItem.ID = OrderItem.ID WHERE ("SiteTree"."ClassName" IN ('Product')) AND (`Product`.`AllowPurchase` IS TRUE) GROUP BY Product.ID ORDER BY NewNumberSold DESC You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRUE) GROUP BY Product.ID ORDER BY NewNumberSold DESC' at line 1
-
Re: Error on check out

15 July 2010 at 3:16pm
This error is related to the current release of ecommerce module found here http://silverstripe-ecommerce.googlecode.com/svn/trunk/
Line 117 of Product.php
$q = $ps->buildSQL("`Product`.`AllowPurchase` IS TRUE");should be
$q = $ps->buildSQL("`Product`.`AllowPurchase` = 1");Silver Stripe seems to be formatting declared datatypes of Boolean as tinyint(1) in the database, I assume that why 'is true' results in error.
| 865 Views | ||
|
Page:
1
|
Go to Top |

