• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

kuhajeyan
#1 Posted : Saturday, August 16, 2014 12:44:19 PM(UTC)
kuhajeyan

Rank: Member

Joined: 8/16/2014(UTC)
Posts: 7
Location: colombo

Thanks: 2 times
I did try following , it returned be true. but it is not showing up in the admin catalog

WebServices3SoapClient ws = new WebServices3SoapClient(); AuthenticationToken token = ws.Login("xxxxxxxxxxxx", "xxxxxxxxxxxxx");
Product product = new Product();
product.Sku = "gksku123";
product.ProductName = "gktest123";
product.SitePrice = 4.95m;
// insert new product into database
bool created = ws.Catalog_InternalProduct_Insert(ref token, product);
// retrieve new product from database
product = ws.Catalog_InternalProduct_FindBySku(ref token, "123");
product.ShippingWeight = 2.5m;
// update product
bool updated = ws.Catalog_InternalProduct_Update(ref token, product);

Edited by user Monday, August 18, 2014 10:34:12 AM(UTC)  | Reason: Not specified

Aaron
#2 Posted : Monday, August 18, 2014 1:16:33 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
I suspect you will see the product in the database if you query it using SQL. I think the problem is that you didn't set the SpecialProductType field, so it's probably not the right value. For regular products (i.e. not gift certificates or kits), you want the value to be "0" (no quotes).
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
 1 user thanked Aaron for this useful post.
kuhajeyan
#3 Posted : Monday, August 18, 2014 2:15:02 PM(UTC)
kuhajeyan

Rank: Member

Joined: 8/16/2014(UTC)
Posts: 7
Location: colombo

Thanks: 2 times
Thanks Aaron,

I did for SpecialProductType = 0, and the product is still not showing up, but I can query via "FindByBvin" or "FindBySku"

Confused still why it is not showing up

Quote:

var client = new WebServices3SoapClient();
AuthenticationToken authenticationToken = client.Login("xxxxxx", "xxxxxxxxxxxxxxx");



Product p = client.Catalog_InternalProduct_FindBySku(ref authenticationToken, "FIL-70139-KB");//this is an existing produc

string productName = "mytestproduct";
string sku = "mytestsku";

string productBvin = Guid.NewGuid().ToString();


Product newProduct = new Product()
{
Bvin = productBvin,
Saved = true,
Sku = sku,
ProductName = productName,
LongDescription = productName,
ShortDescription = productName,
MinimumQty = 1,
OutOfStockMode = ProductInventoryMode1.LeaveOnStore,
ProductTypeId = p.ProductTypeId,
SitePrice = 10,
Status = ProductStatus.Active,
Categories = p.Categories,
Groups = p.Groups,
VendorId = p.VendorId,
ManufacturerId = p.ManufacturerId,
ShippingMode = ShippingMode.ShipFromSite,
SpecialProductType = 0,




};

bool created = client.Catalog_InternalProduct_Insert(ref authenticationToken, newProduct);
//here created returning true, but nothing in the catalog being show


kuhajeyan
#4 Posted : Monday, August 18, 2014 2:25:19 PM(UTC)
kuhajeyan

Rank: Member

Joined: 8/16/2014(UTC)
Posts: 7
Location: colombo

Thanks: 2 times
Ok. Anyway Aaaron's direction helped.

It is an enum SpecialProductTypes1.Normal



Quote:
var client = new WebServices3SoapClient();
AuthenticationToken authenticationToken = client.Login("xxxxxx", "xxxxxxxxxxxxxxx");



Product p = client.Catalog_InternalProduct_FindBySku(ref authenticationToken, "FIL-70139-KB");//this is an existing produc

string productName = "mytestproduct";
string sku = "mytestsku";

string productBvin = Guid.NewGuid().ToString();


Product newProduct = new Product()
{
Bvin = productBvin,
Saved = true,
Sku = sku,
ProductName = productName,
LongDescription = productName,
ShortDescription = productName,
MinimumQty = 1,
OutOfStockMode = ProductInventoryMode1.LeaveOnStore,
ProductTypeId = p.ProductTypeId,
SitePrice = 10,
Status = ProductStatus.Active,
Categories = p.Categories,
Groups = p.Groups,
VendorId = p.VendorId,
ManufacturerId = p.ManufacturerId,
ShippingMode = ShippingMode.ShipFromSite,
SpecialProductType = SpecialProductTypes1.Normal,




};
Forum Jump  
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.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012