Options for Template Email to Vendor

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
allcourtsports
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Wed Feb 09, 2011 3:44 pm

Options for Template Email to Vendor

Post by allcourtsports » Tue Dec 06, 2011 12:04 pm

Can anyone tell me how to include COGS in Vendor email template?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Options for Template Email to Vendor

Post by mazhar » Wed Dec 07, 2011 7:00 am

Edit the template and locate

Code: Select all

#if ($orderItem.OrderItemType == "Product")
          $orderItem.Sku
#else
and update it like

Code: Select all

#if ($orderItem.OrderItemType == "Product")
          $orderItem.Sku
         $orderItem.CostOfGoods
#else

allcourtsports
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Wed Feb 09, 2011 3:44 pm

Re: Options for Template Email to Vendor

Post by allcourtsports » Thu Dec 08, 2011 8:47 pm

Thanks. That was easy! I was able to include it as a cell just to the right of the Quantity. The problem I have now is that I have many products where I do not want to include the CostOfGoods in the Vendor Email. Can I tweak the code to enable the COGS only if there is a value greater than zero in the field because the field defaults to 0.00. Also, is there any way to remove the additional zeros after the COGS when it populates in the vendor email (It looks like 9.9900 instead of 9.99)?

Thanks for your help with this!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Options for Template Email to Vendor

Post by mazhar » Fri Dec 09, 2011 6:56 am

Try it like this

Code: Select all

$orderItem.CostOfGoods.ToString("ulc")

allcourtsports
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Wed Feb 09, 2011 3:44 pm

Re: Options for Template Email to Vendor

Post by allcourtsports » Fri Jan 20, 2012 3:59 pm

That worked! Thank you. Now all I need to figure out is how to not include COGS in the purchase order if the COGS field does not have a value greater than 0.00 (the default) listed. We have several orders that will not require COGS and we do not want the field to show with this 0.00 as the COGS. Is there a way to only include COGS in the purchase order if the amount in the COGS field is greater than 0.00?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Options for Template Email to Vendor

Post by mazhar » Mon Jan 23, 2012 7:41 am

Yes its possible. You can do it like

Code: Select all

#if($orderItem.CostOfGoods > 0)
$orderItem.CostOfGoods.ToString("ulc")
#end

azar
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Sat Nov 27, 2010 11:43 am

Re: Options for Template Email to Vendor

Post by azar » Thu Jul 19, 2012 9:09 am

I have the same problem. Does anyone know how ToString("ulc") and ToString("C") are different?

Post Reply