title: Set ProductVariantAttribute value with nopCommerce
body: <p>I have a requirement to specify some values per-item per-sale. Imagine being able to add a gift message to each item in the basket individually.</p>
  
  <p>How can this be achieved?</p>
  
  <p>I'm using nopCommerce 1.6 (for .net 3.5 compatibility).</p>
  
  <p>I have added three "Product Attributes" (Catalog > Products > Product Attributes). Created a product and in the default product variation, added the three attributes to the product.</p>
  
  <p>The attributes are of type TextBox which, I believe will allow me to enter any value I like as a string.</p>
  
  <p>How do I programatically set these values. From what I can tell <code>ShoppingCartManager.AddToCart</code> looks like it takes a string containing XML for the attributes as the fourth argument:</p>
  
  <pre><code>public static List&lt;string&gt; AddToCart(ShoppingCartTypeEnum shoppingCartType, int productVariantId, string selectedAttributes, decimal customerEnteredPrice, int quantity);
  </code></pre>
  
  <p>But I can't see anything that explains how the XML should be structured.</p>
  
  <p><strong>Please note:</strong> I'm integrating with another CMS so I'm not using the standard nopCommerce controls for the display of the products.</p>