| David Morgan 2004-02-04, 1:41 pm |
| You want to use two tables as the Product Table?
You will need to change the stages that check product details & pricing to
use both tables. Your problem is occurring because the product is added
from 'stones' but does not exist in 'products'. The Pipeline only looks at
products. You will need to create a view or something that UNIONs both
tables together and then point the pipeline components at this view.
Needless to say, both tables will need to have exactly the same structure.
HTH
Dave M
"bobby" <babak62@yahoo.com> wrote in message
news:02d601c3bf6b$70190680$a501280a@phx.gbl...quote:
> Hi:
> I am running siteserver 3 commerce. Besides my product
> table I have an another table called stones which I want
> to use as product at the same site. I have already
> survived to manage pass the xt_orderform_additem1.asp page
> which I created for this purpose but the moment I hit the
> basket I see the error:
>
> Please note that one or more items were removed from
> your basket because the product is no longer sold.
> and here is mu query string:
>
> Set MSCSQueryMap.product_info1 = AddQuery("SELECT sku,
> name, color, amount,quantity, dept_id FROM stones
> WHERE sku = ?")
>
>
> Here is when I dump the order before:
>
> ** Orderform Contents **
> Items List
> Item 1
> Key [SKU] {String} Value [BR428] {String}
> Key [Quantity] {String} Value [1] {Long}
> Key [name] {String} Value [Rare Antique
> 71g Silver 23Ct Citrine Bracelet] {String}
> Key [list_price] {String} Value [49900]
> {Long}
> Key [dept_id] {String} Value [23] {Long}
> Key [placed_price] {String} Value [49900]
> {Long}
> Item 2
> Key [SKU] {String} Value [552941] {String}
> Key [Quantity] {String} Value [1] {Long}
> Key [name] {String} Value [Round Diamond]
> {String}
> Key [list_price] {String} Value [4892.4]
> {String}
> Key [dept_id] {String} Value [30] {Long}
> End of Items List
> Order Key [shopper_id] {String} Value
> [V61R6JPKE3XN9GDTUU93CK8BLXG888UF] {String}
> Order Key [date_changed] {String} Value [12/10/2003
> 2:11:33 PM] {Date}
> Order Key [order_id] {String} Value
> [TSV8VBPL7KD78H9TGENGM0DHK7] {String}
> Order Key is [_Basket_Errors] Start List
> End of List
> Order Key is [_Purchase_Errors] Start List
> End of List
> Order Key is [_Verify_With] Start Dictionary
> End of Dictionary
> ** End of Orderform Contents **
>
>
> And After:
>
> ** Orderform Contents **
> Items List
> Item 1
> Key [SKU] {String} Value [BR428] {String}
> Key [Quantity] {String} Value [1] {Long}
> Key [name] {String} Value [Rare Antique
> 71g Silver 23Ct Citrine Bracelet] {String}
> Key [list_price] {String} Value [49900]
> {Long}
> Key [dept_id] {String} Value [23] {Long}
> Key [placed_price] {String} Value [49900]
> {Long}
> Key [_product_sku] {String} Value [BR428]
> {String}
> Key [_product_name] {String} Value [Rare
> Antique 71g Silver 23Ct Citrine Bracelet] {String}
> Key [_product_list_price] {String} Value
> [49900] {Long}
> Key [_product_sale_price] {String} Value
> [0] {Long}
> Key [_product_sale_start] {String} Value
> [1/1/1975] {Date}
> Key [_product_sale_end] {String} Value
> [1/1/1975] {Date}
> Key [_product_quantity] {String} Value [1]
> {String}
> Key [_product_dept_id] {String} Value [23]
> {Long}
> Item 2
> Key [SKU] {String} Value [552941] {String}
> Key [Quantity] {String} Value [1] {Long}
> Key [name] {String} Value [Round Diamond]
> {String}
> Key [list_price] {String} Value [4892.4]
> {String}
> Key [dept_id] {String} Value [30] {Long}
> Key [delete] {String} Value [1] {String}
> End of Items List
> Order Key [shopper_id] {String} Value
> [V61R6JPKE3XN9GDTUU93CK8BLXG888UF] {String}
> Order Key [date_changed] {String} Value [12/10/2003
> 2:11:33 PM] {Date}
> Order Key [order_id] {String} Value
> [TSV8VBPL7KD78H9TGENGM0DHK7] {String}
> Order Key is [_Basket_Errors] Start List
> End of List
> Order Key is [_Purchase_Errors] Start List
> End of List
> Order Key is [_Verify_With] Start Dictionary
> End of Dictionary
> ** End of Orderform Contents **
>
> and this is the code to my xt_orderform_additem1.asp:
>
> <%@ LANGUAGE=vbscript enablesessionstate=false
> LCID=1033 %>
> <!--#INCLUDE FILE="i_shop.asp" -->
> <!--#INCLUDE FILE="i_util.asp" -->
>
> <%
> function OrderFormAddItem(byVal orderFormStorage,
> byVal shopperID)
> Set mscsOrderForm =
> UtilGetOrderForm(mscsOrderFormStorage, created)
>
> REM -- retrieve quantity:
> product_qty = mscsPage.RequestNumber("qty", "1",
> 1, 999)
> if IsNull(product_qty) then
> product_qty = 1
> end if
>
> REM -- retrieve sku and dept_id:
> sku = mscsPage.RequestString("sku")
> quoted_sku = "'" & Replace(sku,"'","''") & "'"
> dept_id = mscsPage.RequestNumber("dept_id")
>
>
> REM -- retrieve product:
> sqlText = MSCSQueryMap.product_info1.SQLCommand
> sqlText = Replace(sqlText, "?", quoted_sku, 1, 1)
> sqlText = Replace(sqlText, "?", dept_id, 1, 1)
> cmdTemp.CommandText = sqlText
> Set rsProduct =
> Server.CreateObject("ADODB.Recordset")
> rsProduct.Open cmdTemp, , adOpenStatic,
> adLockReadOnly
>
> list_price = rsProduct("amount").value
> color = rsProduct("color").value
> name = rsProduct("name").value
> rsProduct.Close
> response.Write(list_price)
> response.Write("<BR>")
> response.Write(name)
> response.Write("<BR>")
> response.Write(dept_id)
> response.Write("<BR>")
> response.Write(product_qty)
> response.Write("<BR>")
> response.Write(sku)
> response.Write("<BR>")
> response.Write(color)
> response.Write("<BR>")
> 'response.End()
> REM -- add item to order form:
> set item = mscsOrderForm.AddItem(sku, product_qty,
> list_price)
> item.name = name
> item.list_price = list_price
> item.dept_id = dept_id
> item.sku = sku
> item.quantity = product_qty
>
> MSCS.Close
>
> REM -- commit order form back to storage:
> Call UtilPutOrderForm(orderFormStorage,
> mscsOrderForm, created)
>
> OrderFormAddItem = true
> end function
>
> Set mscsOrderFormStorage = UtilGetOrderFormStorage()
>
>
> success = OrderFormAddItem(mscsOrderFormStorage,
> mscsShopperID)
> call Response.Redirect("basket.asp?" &
> mscsPage.URLShopperArgs())
>
> %>
>
> As you see in the code there are response.write
> statements and I am printing all af the values
> correctly but then again nothing appears in the
> basket. Would you please help me for this???
>
>
|