I've written a custom XML package that I call via WSI. I can not get the RuntimeParams to pass through to the query.
Here is the query for the XML Package, which works fine if defvalue has a valid manufacturer id. So I'm pretty sure the package and query are fine
Code:
<query name="Products" rowElementName="Product">
<sql>
<![CDATA[
SELECT p.ProductID, p.Name, p.TrackInventoryBySizeAndColor, pv.VariantID, pv.ManufacturerPartNumber, pv.Price, pv.SalePrice, pv.Cost, pv.Inventory, pmfg.ManufacturerID,
Manufacturer.Name AS MfgName, inv.VendorFullSKU, inv.Quan AS SizeColorInventory, p.Published, p.SKU, pv.SKUSuffix, p.ProductGUID, pv.VariantGUID,
inv.InventoryGUID
FROM Product AS p INNER JOIN
ProductVariant AS pv ON p.ProductID = pv.ProductID INNER JOIN
Inventory AS inv ON pv.VariantID = inv.VariantID INNER JOIN
ProductManufacturer AS pmfg ON p.ProductID = pmfg.ProductID INNER JOIN
Manufacturer ON pmfg.ManufacturerID = Manufacturer.ManufacturerID
WHERE (pmfg.ManufacturerID=@ManufacturerID) AND (p.TrackInventoryBySizeAndColor=1)
]]>
</sql>
<queryparam paramname="@ManufacturerID" paramtype="runtime" requestparamname="ManufacturerID" sqlDataType="int" defvalue="0" validationpattern="" />
</query>
Here is the WSI request that calls the package and should pass in the manufacturer id...
Code:
<AspDotNetStorefrontImport>
<XmlPackage Name="dumpscproduct.xml.config" RuntimeParams="ManufacturerID=4" OutputType="INLINE"/>
</AspDotNetStorefrontImport>
I have looked at the debug output and the RuntimeParams are not being inserted into the runtime xml. I can't find any other actual examples of executing a custom xml package and everything I have tried hasn't helped.
Is there something wrong with my request?
Thanks,
Rob