<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.waycoolwebdesign.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Ubercart</title>
 <link>http://www.waycoolwebdesign.com/Blog/Ubercart</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>Customize the Ubercart Email Based on Product</title>
 <link>http://www.waycoolwebdesign.com/Blog/2009/09/23/Customize-Ubercart-Email-Based-Product</link>
 <description>&lt;div class=&quot;google_ad1&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-2938344934790216&quot;;
/* 200x200 for Blog, created 3/11/09 */
google_ad_slot = &quot;6360764911&quot;;
google_ad_width = 200;
google_ad_height = 200;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;p&gt;Let&#039;s learn to customize the Ubercart 2 purchase confirmation email based on product. Modifying the message is fairly straightforward, though not the most user-friendly in a Drupally sense.&lt;/p&gt;
&lt;p&gt;What I needed was a way to customize text on the email based on what products had been purchased. I imagine this could be something added later to the node itself so that each product could have it&#039;s own text blurb added to the email when purchased, or if related to a purchased product, however I needed a quicker solution.&lt;/p&gt;
&lt;h2&gt;Find the Ubercart Email Template&lt;/h2&gt;
&lt;p&gt;In your file structure find modules/ubercart/uc_order/templates/customer.itpl.php for editing. At the top of the template add something like:&lt;br /&gt;&amp;lt;?php foreach ($order-&amp;gt;products as $product2) {&lt;br /&gt;    if ($product2-&amp;gt;nid == 52) { $flag1 = 1; }&lt;br /&gt;    if ($product2-&amp;gt;nid == 53) { $flag2 = 1; }&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/p&gt;
&lt;div class=&quot;google_ad1&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-2938344934790216&quot;;
/* 200x200 for Blog, created 3/11/09 */
google_ad_slot = &quot;6360764911&quot;;
google_ad_width = 200;
google_ad_height = 200;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;p&gt;You will of course need the &amp;quot;nid&amp;quot; of whatever your product nodes are. An example of this usage would be if you had a sporting goods store that sold products as well as training events like baseball camps. You could use something like this to check to see if the user had purchased a baseball glove and then insert a blurb into the email about upcoming baseball training camps.&lt;/p&gt;
&lt;p&gt;In my case I was selling events and wanted a way to remind the user of the directions to the event. Since the events could be held in different buildings and/or rooms we needed to provide text based on the event. &lt;/p&gt;</description>
 <comments>http://www.waycoolwebdesign.com/Blog/2009/09/23/Customize-Ubercart-Email-Based-Product#comments</comments>
 <category domain="http://www.waycoolwebdesign.com/Blog/CMS">CMS</category>
 <category domain="http://www.waycoolwebdesign.com/Blog/Drupal">Drupal</category>
 <category domain="http://www.waycoolwebdesign.com/Blog/Ecommerce">Ecommerce</category>
 <category domain="http://www.waycoolwebdesign.com/Blog/Ubercart">Ubercart</category>
 <pubDate>Wed, 23 Sep 2009 10:19:51 -0400</pubDate>
 <dc:creator>John</dc:creator>
 <guid isPermaLink="false">218 at http://www.waycoolwebdesign.com</guid>
</item>
<item>
 <title>Multiple Event Registration Using Drupal &amp; Ubercart Attributes</title>
 <link>http://www.waycoolwebdesign.com/Blog/2009/09/23/Multiple-Event-Registration-Using-Drupal-Ubercart-Attributes</link>
 <description>&lt;div class=&quot;google_ad1&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-2938344934790216&quot;;
/* 200x200 for Blog, created 3/11/09 */
google_ad_slot = &quot;6360764911&quot;;
google_ad_width = 200;
google_ad_height = 200;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;p&gt;Although not as flexible as Webform, we decided to use Ubercart Attributes to enable multiple event registration using Drupal. Here&#039;s a quick look into how to use it yourself. We use Drupal 6 the Ubercart 2 module.&lt;/p&gt;
&lt;p&gt;This solution may not be suitable if you have advanced needs for information gathering or special user tracking, however if your need is simply to gather some info and allow a user to pay in advance for an event registration, this does the trick.&lt;/p&gt;
&lt;p&gt;If you haven&#039;t yet, create an Event product class in Ubercart via the &amp;quot;Manage Classes&amp;quot; page (/admin/store/products/classes). Create a test event node we can play with.&lt;/p&gt;
&lt;div class=&quot;google_ad1&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-2938344934790216&quot;;
/* 200x200 for Blog, created 3/11/09 */
google_ad_slot = &quot;6360764911&quot;;
google_ad_width = 200;
google_ad_height = 200;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;p&gt;In /admin/store/attributes click &amp;quot;add an attribute&amp;quot;, for example, &amp;quot;Attendee Name&amp;quot;. Choose &amp;quot;text field&amp;quot;. Now let&#039;s edit your test event node. Near the top of the edit screen is the extra navigation Ubercart adds to product content types (&amp;quot;classes&amp;quot;). Choose &amp;quot;Attributes&amp;quot;. Click the &amp;quot;add attributes form&amp;quot; link. You will see a box containing all the Attributes you created earlier. If you only created the one &amp;quot;Attendee Name&amp;quot; attribute then there will only be one attribute in this box. Select it and click the &amp;quot;add attributes&amp;quot; button. This attribute will now show up in your &amp;quot;add to cart&amp;quot; area of the node.&lt;/p&gt;
&lt;p&gt;All that remains is some styling and you&#039;re all set!&lt;/p&gt;</description>
 <comments>http://www.waycoolwebdesign.com/Blog/2009/09/23/Multiple-Event-Registration-Using-Drupal-Ubercart-Attributes#comments</comments>
 <category domain="http://www.waycoolwebdesign.com/Blog/CMS">CMS</category>
 <category domain="http://www.waycoolwebdesign.com/Blog/Drupal">Drupal</category>
 <category domain="http://www.waycoolwebdesign.com/Blog/Ecommerce">Ecommerce</category>
 <category domain="http://www.waycoolwebdesign.com/Blog/Ubercart">Ubercart</category>
 <pubDate>Wed, 23 Sep 2009 09:37:37 -0400</pubDate>
 <dc:creator>John</dc:creator>
 <guid isPermaLink="false">216 at http://www.waycoolwebdesign.com</guid>
</item>
</channel>
</rss>
