Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 12 of 12

Thread: 50% Off Price (I'm sure it's pretty simple)

  1. #1
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default 50% Off Price (I'm sure it's pretty simple)

    I would simply like to split the price by 2, so it shows as 50% off. . . Can this be done in the XML package or should it be done in the SPROC (and which one) or both?

    Thank you in advance,

    ~D

  2. #2
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Actually, it's going to be 50% of the MSRP - placed into the Price field. Anyone?

  3. #3
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    All right. . . I have this code and it works in SQL. Now, how would I parse this and use this in the XML package?

    <query name="July4th" rowElementName="Price" runif="showproduct">
    <sql>
    <![CDATA[
    select MSRP/2 from dbo.ProductVariant with(NOLOCK) where ProductID=@ProductID and IsDefault=1
    ]]>
    </sql>
    <queryparam paramname="@ProductID" paramtype="request" requestparamname="ProductID" sqlDataType="int" defvalue="0" validationpattern="^\d{1,10}$" />
    </query>

  4. #4
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    OK. So that code does NOT work. The SQL works, but that code does not work in the XML package. I'm not sure why. . . Can anyone help with this?

  5. #5
    ZachJ85 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philadelphia, PA
    Posts
    99

    Default

    I think you're looking too much into it. Do you just want to give a flat 50% off of an item's MSRP?

    If so,

    http://manual.aspdotnetstorefront.co...discounts.aspx

    You prob can manipulate that to work as you want.
    SQL 2008, Visual Studio 2010
    Source: C#
    Version: AspDotNetStorefront ML 8.0.1.1/8.0.1.1
    Framework: .Net 4.0 (Running)

  6. #6
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by ZachJ85 View Post
    I think you're looking too much into it. Do you just want to give a flat 50% off of an item's MSRP?

    If so,

    http://manual.aspdotnetstorefront.co...discounts.aspx

    You prob can manipulate that to work as you want.
    I do not see a Misc menu. . .

  7. #7
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Found it. . . It's under Configuration -> Pricing and Promotions.

  8. #8
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    I tried doing that. . . But we are not using the shopping cart. I want to see the discount immediately when they visit the product page.

    I added a new discount tble called July 4th.
    Low Quantity is 1 and High Quantity is 1
    Discount is 50 and it is a percentage

    I went into the entity and assigned it to the July 4th table. . .

    I just need to diveide the MSRP by 2 or take 50% off. . .

  9. #9
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    This shouldn't be hard. . . This works in SQL:

    select MSRP/2 from dbo.ProductVariant with(NOLOCK) where ProductID=316 and IsDefault=1

    So, why couldn't I add this into the XML package and then call this and display it as I want? Unfortunately, it's not working in the XML package. . .

  10. #10
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Hi

    I'm a bit confused. Are you simply trying to change the prices of one manufacturer so that all products are 50% off the MSRP?

  11. #11
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Is so why not simply use the excel/xml price change import template?

  12. #12
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    I'm not going to do this anymore. . . We're just going to do it through our inventory system and I am going to grab from a new field in there.

    But, yes. . . all I wanted to do was (on the fly through XML) divide the MSRP by 2 to get a 50% off price.

    Thanks.