Index: main/plugin-odf-web/pages/services/cart/cart.xsl
===================================================================
--- main/plugin-odf-web/pages/services/cart/cart.xsl	(revision 41013)
+++ main/plugin-odf-web/pages/services/cart/cart.xsl	(working copy)
@@ -150,37 +150,47 @@
     
     <xsl:template name="display-cart">
         <script type="text/javascript">
-            $j("#cart-content-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
             
-            // List of programs
-            var programs = odfcart_getPrograms();
-            if (Object.keys(programs).length &gt; 0)
-            {
-                $j("#cart-programs-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
-                displayCartElements_<xsl:value-of select="$uniqueId"/> ('programs', 'cart-programs-list-<xsl:value-of select="$uniqueId"/>');
-            }
-            else
+            function displayCart_<xsl:value-of select="$uniqueId"/> ()
             {
-                $j("#cart-programs-<xsl:value-of select="$uniqueId"/>")[0].style.display = 'none';
+	            $j("#cart-content-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	            
+	            // List of programs
+	            $j("#cart-programs-list-<xsl:value-of select="$uniqueId"/>").html('');
+	            var programs = odfcart_getPrograms();
+	            if (Object.keys(programs).length &gt; 0)
+	            {
+	                $j("#cart-programs-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	                displayCartElements_<xsl:value-of select="$uniqueId"/> ('programs', 'cart-programs-list-<xsl:value-of select="$uniqueId"/>');
+	            }
+	            else
+	            {
+	                $j("#cart-programs-<xsl:value-of select="$uniqueId"/>")[0].style.display = 'none';
+	            }
+	            
+	            // List of courses
+	            $j("#cart-courses-list-<xsl:value-of select="$uniqueId"/>").html('');
+                var courses = odfcart_getCourses();
+	            if (Object.keys(courses).length &gt; 0)
+	            {
+	                $j("#cart-courses-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	                
+	                displayCartElements_<xsl:value-of select="$uniqueId"/> ('courses', 'cart-courses-list-<xsl:value-of select="$uniqueId"/>');
+	            }
+	            else
+	            {
+	                $j("#cart-courses-<xsl:value-of select="$uniqueId"/>")[0].style.display = 'none';
+	            }
+	            
+	            // Empty cart ?
+	            var isEmpty = Object.keys(programs).length == 0 &amp;&amp; Object.keys(courses).length == 0;
+	            $j("#cart-empty-<xsl:value-of select="$uniqueId"/>")[0].style.display = isEmpty ? '' : 'none';
+	            $j("#clear-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = isEmpty ? 'none' : '';
             }
             
-            // List of courses
-            var courses = odfcart_getCourses();
-            if (Object.keys(courses).length &gt; 0)
-            {
-                $j("#cart-courses-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
-                
-                displayCartElements_<xsl:value-of select="$uniqueId"/> ('courses', 'cart-courses-list-<xsl:value-of select="$uniqueId"/>');
-            }
-            else
-            {
-                $j("#cart-courses-<xsl:value-of select="$uniqueId"/>")[0].style.display = 'none';
-            }
+            displayCart_<xsl:value-of select="$uniqueId"/>();
+            odfcart_listeners.push(displayCart_<xsl:value-of select="$uniqueId"/>);
             
-            // Empty cart ?
-            var isEmpty = Object.keys(programs).length == 0 &amp;&amp; Object.keys(courses).length == 0;
-            $j("#cart-empty-<xsl:value-of select="$uniqueId"/>")[0].style.display = isEmpty ? '' : 'none';
-            $j("#clear-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = isEmpty ? 'none' : '';
         </script>
     </xsl:template>
     
Index: main/plugin-odf-web/resources/js/org/helper/cart-helper.i18n.js
===================================================================
--- main/plugin-odf-web/resources/js/org/helper/cart-helper.i18n.js	(revision 41013)
+++ main/plugin-odf-web/resources/js/org/helper/cart-helper.i18n.js	(working copy)
@@ -14,6 +14,16 @@
  *  limitations under the License.
  */
 
+odfcart_listeners = [];
+
+function odfcart_executeListener ()
+{
+	for (var i in odfcart_listeners)
+	{
+		odfcart_listeners[i]();
+	}
+}
+
 /**
  * Add a program into the cart
  * @param {String} id the id of the program to add
@@ -215,7 +225,8 @@
 			}
     		alert(message);
 		}
-        document.location.reload(false);
+    	
+    	odfcart_executeListener();
     }
     
     function handleError(jqXHR, textStatus, errorThrown)
Index: main/plugin-odf-web/stylesheets/helper/cart.xsl
===================================================================
--- main/plugin-odf-web/stylesheets/helper/cart.xsl	(revision 41013)
+++ main/plugin-odf-web/stylesheets/helper/cart.xsl	(working copy)
@@ -45,29 +45,34 @@
             
             <script type="text/javascript">
                 // Number of elements into the cart
-                
-                var nbPrograms = Object.keys(odfcart_getPrograms()).length;
-                var nbCourses = Object.keys(odfcart_getCourses()).length;
-                
-                $j("#cart-counter-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
-                var count = nbPrograms + nbCourses;
-                $j("#cart-counter-<xsl:value-of select="$uniqueId"/>")[0].innerHTML = " (" + count + ")";
-                
-                var title = '';
-                if (nbPrograms &gt; 0)
-                {
-                    title += nbPrograms == 1 ? "<i18n:text i18n:key="PLUGINS_ODFWEB_CART_PROGRAM" i18n:catalogue="plugin.odf-web"/>" : nbPrograms + " <i18n:text i18n:key="PLUGINS_ODFWEB_CART_PROGRAMS" i18n:catalogue="plugin.odf-web"/>";
-                }
-                if (nbCourses &gt; 0)
+                function displayNbElementIntoCart_<xsl:value-of select="$uniqueId"/>()
                 {
-                    if (title.length != 0)
-                    {
-                        title += ", ";
-                    }
-                    title += nbCourses == 1 ? "<i18n:text i18n:key="PLUGINS_ODFWEB_CART_COURSE" i18n:catalogue="plugin.odf-web"/>" : nbCourses + " <i18n:text i18n:key="PLUGINS_ODFWEB_CART_COURSES" i18n:catalogue="plugin.odf-web"/>";
+	                var nbPrograms = Object.keys(odfcart_getPrograms()).length;
+	                var nbCourses = Object.keys(odfcart_getCourses()).length;
+	                
+	                $j("#cart-counter-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	                var count = nbPrograms + nbCourses;
+	                $j("#cart-counter-<xsl:value-of select="$uniqueId"/>")[0].innerHTML = " (" + count + ")";
+	                
+	                var title = '';
+	                if (nbPrograms &gt; 0)
+	                {
+	                    title += nbPrograms == 1 ? "<i18n:text i18n:key="PLUGINS_ODFWEB_CART_PROGRAM" i18n:catalogue="plugin.odf-web"/>" : nbPrograms + " <i18n:text i18n:key="PLUGINS_ODFWEB_CART_PROGRAMS" i18n:catalogue="plugin.odf-web"/>";
+	                }
+	                if (nbCourses &gt; 0)
+	                {
+	                    if (title.length != 0)
+	                    {
+	                        title += ", ";
+	                    }
+	                    title += nbCourses == 1 ? "<i18n:text i18n:key="PLUGINS_ODFWEB_CART_COURSE" i18n:catalogue="plugin.odf-web"/>" : nbCourses + " <i18n:text i18n:key="PLUGINS_ODFWEB_CART_COURSES" i18n:catalogue="plugin.odf-web"/>";
+	                }
+	                
+	                $j("#gotocart-<xsl:value-of select="$uniqueId"/>")[0].title = title;
                 }
                 
-                $j("#gotocart-<xsl:value-of select="$uniqueId"/>")[0].title = title;
+                displayNbElementIntoCart_<xsl:value-of select="$uniqueId"/>();
+                odfcart_listeners.push(displayNbElementIntoCart_<xsl:value-of select="$uniqueId"/>);
             </script>    
         </xsl:if>
     </xsl:template>
@@ -159,14 +164,21 @@
         </xsl:variable>
         
         <script type="text/javascript">
-            if (odfcart_contains('<xsl:value-of select="@id"/>'))
-            {
-            	$j("#remove-from-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
-            }
-            else
+            function displayAddOrRemove_<xsl:value-of select="$uniqueId"/>()
             {
-            	$j("#add-to-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	            if (odfcart_contains('<xsl:value-of select="@id"/>'))
+	            {
+	            	$j("#remove-from-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	                $j("#add-to-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = 'none';
+                }
+	            else
+	            {
+	                $j("#remove-from-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = 'none';
+                	$j("#add-to-cart-<xsl:value-of select="$uniqueId"/>")[0].style.display = '';
+	            }
             }
+            displayAddOrRemove_<xsl:value-of select="$uniqueId"/>();
+            odfcart_listeners.push(displayAddOrRemove_<xsl:value-of select="$uniqueId"/>);
             
             function addToCart_<xsl:value-of select="$uniqueId"/> ()
             {
