You'd have to make a couple modifications...the Show Buy Button option applies at the product level so all variants will inherit this property. I'd recommend using something like the variant level extensiondata field...just use 0 (or blank) in the extensiondata field as one setting; make this the default value (since it's already blank for your items unless you've already customized the site to use it) and then use 1 as the flag to not show the buy button. Then, in your xmlpackage that you use for display of these items, make sure that the variant extensiondata is returned by the sql query (you may have to modify the query or a stored procedure depending on the package you are using...for example if you are using the product.variantsinrightbar.xml.config xmlpackage you'll need to modify the aspdnsf_ProductInfo sproc to retrieve and return the variant extension data):
Code:
SELECT
p.*,
pv.VariantID, pv.name VariantName, pv.Price, pv.Description VariantDescription, isnull(pv.SalePrice, 0) SalePrice, isnull(SkuSuffix, '') SkuSuffix, pv.Dimensions, pv.Weight, isnull(pv.Points, 0) Points, pv.Inventory, pv.ImageFilenameOverride VariantImageFilenameOverride, pv.isdefault, pv.CustomerEntersPrice, isnull(pv.colors, '') Colors, isnull(pv.sizes, '') Sizes,
pv.ExtensionData VariantExtensionData, sp.name SalesPromptName,
case when pcl.productid is null then 0 else isnull(e.Price, 0) end ExtendedPrice
and then around both the price lines, and the aspdnsf:AddtoCartForm lines do a check of that VariantExtensionData field AND whatever other conditions are necessary to see the price and add to cart button, i.e.
Code:
<xsl:choose>
<xsl:when test="number(VariantExtensionData) = 0 or VariantExtensionData = '' or 'your other test conditions here'">
<xsl:value-of select="aspdnsf:ShowQuantityDiscountTable(ProductID)" disable-output-escaping="yes"/>
<br/>
<xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 0)" disable-output-escaping="yes"/>
</xsl:when>
<xsl:otherwise>
<!-- If you want to display some instructional information when the button doesn't display -->
<!-- this is where you should do it -->
</xsl:otherwise>
</xsl:choose>