Search - ASP Shopping Cart
QuadComm e-commerce solutions
Home
Q-Shop ASP Shopping Cart
Knowledge Base > Support > Errors Home | Login
Search the Knowledge Base
 
Start Search in the Following Category

Error when adding to cart from the manufacturer list page

Problem:

When listing products by manufacturer, if the user enters a quantity and adds clicks in "Add to cart" from the listing page a 500 error is displayed:

ASP Error occurred 5/4/2004 2:25:59 PM in Microsoft VBScript runtime
Error number: -2146828275 (0x800A000D)
File: /demo/cart.asp, line 240
Type mismatch: '[string: ""]'

If a user adds it to the cart from the product details there is no problem.

Versions affected:

Q-Shop Pro and Lite v3.0 up to rev C (included) 

Solution:

Edit browse.asp and where it says:

 sql= "SELECT Products.*, NULL As MainCatID FROM Products " & _
  "INNER JOIN Manufacturer " & _
  "ON Products.ManuID = Manufacturer.ManuID " & _
  "WHERE Products.ManuID= '" & ManuID & "' AND Products.Show=1" & sqlOrderBy

Change it to:

 sql= "SELECT Products.*, ProductToCategory.CatID As MainCatID FROM Products " & _
  "INNER JOIN " & _
  "(Categories INNER JOIN ProductToCategory ON Categories.CatID = ProductToCategory.CatID) " & _
  "ON Products.ProdID = ProductToCategory.ProdID " & _
  "WHERE Products.ManuID= '" & ManuID & "' AND " & _
  "ProductToCategory.IsMain = 1 AND (Products.Show = 1 AND Categories.Show = 1 ) " & sqlOrderBy

(Important: notice that the lines above should only have a carriage return after " & _", the rest of the return lines are just formatting in the display here and should be removed when editting browse.asp)

Ask a Question
Submit a Question
Knowledge Base Software - myKB.com