Ask a questionAsk a question
 

QuestionCommerce Server 2000 - Applying discounts

  • Thursday, January 22, 2009 8:25 AMHaritha T Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I am using Commerce server 2000, classic asp and facing a problem while applying discounts.

    Below is the process I am trying to implement:

    There is a custom table Promotions which has Promotioncode, ProductId, Price and the table data is being retrieved from another service and the contents of the table are always subjected to change and hence predefining the discounts using BizDesk is not a possible solution.

    Promotion A - Product A - $100
    Promotion B - Product A - $200

    Now I need to modify the price of the product in cart when the user enters promotion code.

    Firstly, I have tried modifying the pipeline component but I was not able to retrieve the Price for a particular promotioncode. Using scriptor component I was able to modify the amounts with hardcoded values but when it came to retrieving the price from Promotions table I was not even able to create ADODB connection object.

    Secondly, I have modified the price in the ordergroup from asp code and called the SaveAsBasket method. Even this did not work as finally when the order is placed the original amounts are being shown in order.

    Below is the list of fields I have changed from asp -

    _iadjust_currentprice
    _cy_iadjust_currentprice
    _cy_oadjust_discount
    _cy_oadjust_adjustedprice

    What is the best approach in order to achieve this? 

    Thank you in advance,
    Haritha