My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 101 attachment: uneeded_cart_partials.patch (3.2 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Index: /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/views/store/show.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/views/store/show.rhtml (revision 104)
+++ /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/views/store/show.rhtml (working copy)
@@ -64,8 +64,7 @@
:url=> { :controller=>'store', :action=>'add_to_cart_ajax', :id => @product.id },
:html => {:name => 'add_product_form'},
:complete => "showPopWin('/store/show_cart', 600, 400, null, true)",
- :failure => 'alert("That item appears to have gone out of stock before you were able to add it to your cart.\n\nPlease refresh this page.")',
- :update => 'items'
+ :failure => 'alert("That item appears to have gone out of stock before you were able to add it to your cart.\n\nPlease refresh this page.")'
)
%>
<% if @variations.size > 0 %>
Index: /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/views/store/show_cart.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/views/store/show_cart.rhtml (revision 104)
+++ /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/views/store/show_cart.rhtml (working copy)
@@ -39,8 +39,7 @@
:action => "remove_from_cart_ajax",
:id => item.product_id },
:loading => " $('remove_#{item.product_id}').hide(); $('indicator_#{item.product_id}').show();",
- :complete => "window.location.reload();",
- :update => "items"
+ :complete => "window.location.reload();"
)
%>
<%= image_tag('indicator.gif', :plugin => 'substruct', :style => 'display:none;', :id => "indicator_#{item.product_id}") %>
@@ -77,7 +76,6 @@
:action => "empty_cart_ajax"},
:loading => "$('empty_cart_image').hide(); $('indicator_delete_all').show();",
:complete => "window.location.reload();",
- :update => "items",
:confirm => "Empty your entire cart?"
}
)
Index: /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/controllers/store_controller.rb
===================================================================
--- /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/controllers/store_controller.rb (revision 104)
+++ /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/controllers/store_controller.rb (working copy)
@@ -188,7 +188,7 @@
else
@cart.add_product(product, quantity.to_i)
logger.info "Product added...success"
- render :partial => 'cart' and return
+ render :nothing => true
end
end

@@ -199,7 +199,7 @@
def remove_from_cart_ajax
product = Item.find(params[:id])
@cart.remove_product(product)
- render :partial => 'cart'
+ render :nothing => true
rescue
render :text => "There was a problem removing that item. Please refresh this page."
end
@@ -209,7 +209,7 @@
# Again, returns cart HTML via partial
def empty_cart_ajax
clear_cart_and_order
- render :partial => 'cart'
+ render :nothing => true
end

# Empties the cart out and redirects to index.

Powered by Google Project Hosting