What I am trying to do - 1. Add in g:product_type - using the categoryID and a String. 2. Display the Brand g:brand by using the name in the Manufacturer to the String....
Have written some code - see below; but the underline bit - is where i might need help - the GET info from Database Nop_Category and Nop_Manufacturer..... I think i am missing a bit of code where NopC gets this... any help would be great...!
Looking at expanding the code for Froogle - Merchant Centre (Google Shopping, Google Base...)
writer.WriteElementString("g", "product_type", googleBaseNamespace, categoryID.ToString; if (categoryID = 53){Console.WriteLine ("Health & Beauty > Personal Care > Cosmetics > Cosmetic Tools");}
// Set number of Quantity of products.... writer.WriteElementString("g", "quantity", googleBaseNamespace, "25");
--------------- or add this code --------------------
// Grabs the current Quantity of products.... writer.WriteElementString("g", "quantity", googleBaseNamespace, productVariant.StockQuantity.ToString(new CultureInfo("en-US",false).NumberFormat));
-------------------- Static - One Brand for all ---------------------
// Results in a <g:brand>Your Brand</g:brand> // writer.WriteElementString("g", "brand", googleBaseNamespace, "Your Brand");
------------------ Or dynamic version ------------------
// Add a reference - helps to find Manufacturers from database using NopSolutions.NopCommerce.BusinessLogic.Manufacturers;
// Add code to the <g:Brand> area - after <g:Description> Manufacturer mamfact = new Manufacturer();
string manufacturerName = product.ProductManufacturers.Count > 0 ? product.ProductManufacturers[0].Manufacturer.Name : String.Empty; // above is all one line...