![]() |
Adding Stock to Product List View |
Post Reply ![]() |
Page 12> |
Author | |
knifepro ![]() Newbie ![]() Joined: 18-February-2008 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() Posted: 11-July-2010 at 5:34pm |
Is it possible to add the number of units in stock to the product list view. The items are listed in the AJAX view. Would like to add them to the regular view. Can someone tell me what code I need to add Okay I figured this one out. I used the following code to show stock on the list page: <% if (scdisplayStock=-1) and (pNoStock=0) then %> <% if (pstock>0) then %> <p class="pcShowProductStock"> <%response.write dictLanguage.Item(Session("language")&"_viewPrd_19") & " " & pStock %> </p> <% end if end if %> Now I am trying to get the backorder message to display on products that are out of stock and allow backordering. Here is what I have but I can't get it to work. Any ideas? <% If (scOutofStockPurchase=-1 AND CLng(pStock)<1 AND pserviceSpec=0 AND pNoStock=0 AND pcv_intBackOrder=1) OR (pserviceSpec<>0 AND scOutofStockPurchase=-1 AND iBTOOutofstockpurchase=-1 AND CLng(pStock)<1 AND pNoStock=0 AND pcv_intBackOrder=1) Then %> <%If clng(pcv_intShipNDays)>0 then%> <%response.write "<div>"&dictLanguage.Item(Session("language")&"_viewPrd_60")&dictLanguage.Item(Session("language")&"_sds_viewprd_1") & pcv_intShipNDays & dictLanguage.Item(Session("language")&"_sds_viewprd_1b") & "</div>"%> <% end if end if %> Edited by knifepro - 14-July-2010 at 6:59pm |
|
Brian
brian@theknifeprofessional.com brian@heartlandbraidedrugs.com www.theknifeprofessional.com www.heartlandbraidedrugs.com ProductCart v4.7 QuickBooks Sync Mobile |
|
![]() |
|
knifepro ![]() Newbie ![]() Joined: 18-February-2008 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Can anyone give me any ideas?
|
|
Brian
brian@theknifeprofessional.com brian@heartlandbraidedrugs.com www.theknifeprofessional.com www.heartlandbraidedrugs.com ProductCart v4.7 QuickBooks Sync Mobile |
|
![]() |
|
knifepro ![]() Newbie ![]() Joined: 18-February-2008 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
I was successful in adding stock to my list view and I am still trying
to add the "Ships with N Days" message to the items I allowed to be back
ordered. I get the message to show but I can not get the value entered into the N Days to show. I would appreciate any help.
<% if (scdisplayStock=-1) and (pNoStock=0) then %> <% if (pstock>0) then %> <p class="pcShowProductStock"> <%response.write dictLanguage.Item(Session("language")&"_viewPrd_19") & " " & pStock %> </p> <% else %> <p class="pcShowProductStock"> <% response.write dictLanguage.Item(Session("language")&"_sds_viewprd_1") & " " & pcv_intShipNDays %> </p> <% end if end if %> |
|
Brian
brian@theknifeprofessional.com brian@heartlandbraidedrugs.com www.theknifeprofessional.com www.heartlandbraidedrugs.com ProductCart v4.7 QuickBooks Sync Mobile |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
Brian - pStock and pcv_intShipNDays represent values that were retrieved from the product table. If you are not getting those values to display, you need to make certain that you have listed the appropriate fields in your query, then populated the page-level variables to display them as presented above. make sense?
|
|
![]() |
|
knifepro ![]() Newbie ![]() Joined: 18-February-2008 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Greg,
It makes sense. Can you advise the file that links up to pcShowProductH.asp. pStock works and shows the number so it must be defined in a query. But I can fine no query in pcShowProduct.asp. |
|
Brian
brian@theknifeprofessional.com brian@heartlandbraidedrugs.com www.theknifeprofessional.com www.heartlandbraidedrugs.com ProductCart v4.7 QuickBooks Sync Mobile |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
What page are you working on? ViewCategories.asp? Another page? Tthere are several that use pcShowProductH.asp for product summary formatting. |
|
![]() |
|
knifepro ![]() Newbie ![]() Joined: 18-February-2008 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
It is the viewcategories.asp. I see where the stock is query:
'// Query Products of current category So I would add products.pcProd_ShipNDays. |
|
Brian
brian@theknifeprofessional.com brian@heartlandbraidedrugs.com www.theknifeprofessional.com www.heartlandbraidedrugs.com ProductCart v4.7 QuickBooks Sync Mobile |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
yes, add that field so that in the middle of the query you have this:
,products.pcProd_BackOrder,products.pcProd_ShipNDays That gets the data pulled out, then you have to grab it for use on the page. Find the following statement, and add the next one below it.
pcv_intBackOrder=pcArray_Products(15,pCnt)
pcv_intShipNDays=pcArray_Products(16,pCnt)
|
|
![]() |
|
knifepro ![]() Newbie ![]() Joined: 18-February-2008 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Okay here is what I have in the query on viewcategories.asp:
query="SELECT products.idProduct, products.sku, products.description, products.price, products.listhidden, products.listprice, products.serviceSpec, products.bToBPrice, products.smallImageUrl,products.noprices,products.stock, products.noStock,products.pcprod_HideBTOPrice, POrder,products.FormQuantity,products.pcProd_BackOrder,products.pcProd_ShipNDays FROM products, categories_products WHERE products.idProduct=categories_products.idProduct AND categories_products.idCategory="& mIdCategory&" AND active=-1 AND configOnly=0 and removed=0 " & pcv_strCSFilters & query1I also added pcv_intShipNDays=pcArray_Products(16,pCnt). |
|
Brian
brian@theknifeprofessional.com brian@heartlandbraidedrugs.com www.theknifeprofessional.com www.heartlandbraidedrugs.com ProductCart v4.7 QuickBooks Sync Mobile |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
I guided you as to what I believed was the correct code, based on looking at a page in another site. If you are unable to tackle this it might be best to hire a developer. Sorry, busy day. |
|
![]() |
Post Reply ![]() |
Page 12> |
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |