ship time message

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
Post Reply
User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

ship time message

Post by ryanstowasser » Mon Apr 14, 2008 5:02 pm

Is there a shipping time frame message built into Ablecommerce?

For example if a product begins being back ordered, can I display a message that tells the customer there will be a delay in shipping?

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: ship time message

Post by m_plugables » Tue Apr 15, 2008 3:24 am

well i think we haven't any time frame message for this purpose.
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: ship time message

Post by m_plugables » Tue Apr 15, 2008 4:08 am

Ok i will try find a workaround and will post the code
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: ship time message

Post by m_plugables » Tue Apr 15, 2008 4:17 am

Here is a sample code you can easily extend it. I assumed that when we got low stock for a product and back order is allowed then there should be a message some where with product information that its shipping may be late.
Create a new file ConLib/BackOrderInfo.ascx and put the following code in it.

Code: Select all

<%@ Control Language="C#" ClassName="BackOrderInfo" %>

<script runat="server">

    private string _text = String.Empty;
    
    [Personalizable(), WebBrowsable()]
    public string Text 
    {
        get { return _text; }
        set { _text = value; }
    }

    protected void Page_Load(Object sender,EventArgs e) 
    {
        int _ProductId = AlwaysConvert.ToInt(Request.QueryString["ProductId"]);
        Product _Product = ProductDataSource.Load(_ProductId);
        if (_Product != null && _Product.AllowBackorder && (_Product.InventoryMode == InventoryMode.Product))
        {
            if (_Product.InStock <= _Product.InStockWarningLevel)
                ShippingMessage.Text = Text;
        }
    }
</script>
<div class="content">
<asp:Label ID="ShippingMessage" runat="server" Visible="true"></asp:Label>
</div>
Now edit the Show Product 1 script let and add following code to it at your desired location

Code: Select all

[[ConLib:BackOrderInfo Text="Your Shipping message here"]]
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

Re: ship time message

Post by ryanstowasser » Tue Apr 15, 2008 3:22 pm

This is helpful, and thank you.

Post Reply