Announcement

Collapse
No announcement yet.

item offer that has a final date to order and automatically disapears

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    item offer that has a final date to order and automatically disapears

    How can I set up certain product items on Actinic that disappear after the offer closing date. I do not want customers to either see the offers after the set date. Thanks

    #2
    Hmmm... I wish you hadn't stuck in that "automatically", 'cos I would have suggested marking the date on a calendar and looking at it every day.

    Still since this is one of these "can't be done's" here is a sort of solution for you to try at your own risk.

    Hiding a product from being displayed after a certain date.

    Go to Advanced / Custom Properties and create one called HIDEAFTER

    Copy your usual product template to a new file E.g. Act_HideAfter.html (which you'll use for these type of products)

    After the line:-

    NETQUOTEVAR:PRODUCTFORMBEGIN

    add the following.

    <script language=JavaScript>
    var now = new Date();
    var nowstr = 'D' + now.getFullYear();
    var nowmonth = now.getMonth() + 1;
    nowstr = nowstr + (nowmonth < 10 ? '0' + nowmonth: nowmonth);
    nowstr = nowstr + (now.getDate() < 10 ? '0' + now.getDate(): now.getDate());
    var hideafter = 'CUSTOMVAR:HIDEAFTER'.replace(/\D/g,"");
    if ( (hideafter != '') && (nowstr > ('D' + hideafter )) ) document.write('<nos' + 'cript>');
    </script>


    above the line

    NETQUOTEVAR:PRODUCTFORMEND

    insert the line

    </noscript>


    Now in the products that you want a timeout on:-
    1) Use the template you modified as above.
    2) Select the Property HIDEAFTER and set it to a date in the form yyyy/mm/dd e.g. 2004/09/25
    (if using Business uncheck Searchable and check Use as CUSTOMVAR)
    Make sure you use 4 digits for the year and 2 digits for the day and month.

    Note these products will still show up when searching but you won't be able to follow the link other than to the top of that page where the product will remain hidden.
    Norman

    PS There may be some unwanted product separators showing up so you might want to comment out the

    NETQUOTEVAR:INCLUDE Act_ProductSeparator.html

    in the patched template
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X