Re: [mezzanine-users] React Mezzanine project starter kit

2016-06-19 Thread Ryne Everett
Something I've been meaning to try out for a while is contributor Alex
Hill's djpj project: https://github.com/AlexHill/djpj. I'm assuming he uses
it with mezzanine projects and if page load performance is your primary
concern it may be an alternative solution.

On Sun, Jun 19, 2016 at 5:21 PM, Niels Jakob Buch  wrote:

> Hi there, I am working on a front-end that has become annoying because of
> too many page loads and has decided to move into using ReactJS.
>
> Anyone has experiences to share with Mezzanine (not only Django) on this
> topic?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] React Mezzanine project starter kit

2016-06-19 Thread Niels Jakob Buch
Hi there, I am working on a front-end that has become annoying because of 
too many page loads and has decided to move into using ReactJS.

Anyone has experiences to share with Mezzanine (not only Django) on this 
topic?

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Check-out process does not work right

2016-06-19 Thread Thanh Minh
Thank you very much. It works!

On Friday, June 17, 2016 at 10:17:07 AM UTC-6, Tran wrote:
>
> Dear you guys,
>
> So currently I set up cartridge and try to make an E-Commerce website. I 
> already set up testing payment on Stripe However, when I test placing an 
> order, the check-out page does not redirect me to the complete page (which 
> it is supposed to do). Instead, I got into error although when I check in 
> my admin page as well as on Stripe, the order was place. Attached is the 
> screenshot of my order steps along with the error and how it should be. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Update fields in cartItem and OrderItem during checkout

2016-06-19 Thread Tran
Are you talking about the SHOP_OPTION_TYPE_CHOICES in settings? If yes, I 
think that works only if we have the options for user to choose (S, M, L), 
but we want the user to enter their neck measurement (which is either 
CharField or DecimalField)

On Sunday, June 19, 2016 at 1:20:41 PM UTC-6, Eduardo Rivas wrote:
>
> I'm not sure if I'm missing something, but wouldn't it be better to add 
> neck size as a regular product variation in the settings? 
>
> That way users can just select the neck size they want when adding the 
> product to the cart, and you won't need to do field injection and the extra 
> checkout step. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Update fields in cartItem and OrderItem during checkout

2016-06-19 Thread Tran

Hi all,

I injected the neck_size field to both CartItem and OrderItem like this

(
"cartridge.shop.models.OrderItem.neck_size",
"DecimalField",
(u"Neck Size",),
{"null": True, "blank": True, "max_digits": 4, "decimal_places": 2},
),
(
"cartridge.shop.models.CartItem.neck_size",
"DecimalField",
(u"Neck Size",),
{"null": True, "blank": True, "max_digits": 4, "decimal_places": 2},
),


I added a new step during the order process, so when a user clicks "Buy" , 
it will not go straight to the "Your Cart" page, but instead, it will go to 
the "SizeForm" page.
I did that by monkey patching def product() to return 
HttpResponseRedirect("sizeForm"). After filling the form out, I did return 
redirect("shop_cart")

I already have the form set up so user can enter their "neck_size" in, but 
I couldn't figure out how to set the entered value to CartItem.neck_size 
and OrderItem.neck_size so they show up under the box Items in the Order 
admin page.
I tried monkey patched the def complete() to do this

current_order_items = OrderItem.objects.filter(order=self)
for item in current_order_items:
if (item is not None):
setattr(item, 'neck_size', request.session["neck_size"]) 
#assume 
request.session['neck_size'] = 10 


It still doesn't work. Does anyone know how to set/update the extra field 
of the selected item (i.e neck_size) after it's already added to cart?

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Check-out process does not work right

2016-06-19 Thread Tran
Thank you everyone! Adding the email config like in the link above made it 
work!

On Friday, June 17, 2016 at 5:48:06 PM UTC-6, Geraldo Gabriel wrote:
>
> Right, that's the correct way to test.
>
> Me newbie helping another newbie.
>
> Hope Tran manages to find his way around.
>
> Em 17/06/2016 17:53, Ryne Everett escreveu:
>
> I think Geraldo is right, but since it looks like you're in 
> DEBUG/development mode you may not want to send out real emails. To simply 
> print them in the console, you can use the setting: 
>
> EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
>
>
> On Fri, Jun 17, 2016 at 2:08 PM, Geraldo Gabriel  > wrote:
>
>> Hi Tran,
>>
>>
>> I'm not familiar with Cartridge but I see you have an email problem in 
>> the traceback.
>>
>> And that would most certainly happen if you were using Windows.
>>
>>
>> Could you try setting up email like this:
>>
>> https://groups.google.com/forum/#!topic/mezzanine-users/D0OoaALImxo
>>
>>
>> And see if you get a different error message.
>>
>> (no clue as to why you can place your order when logged in as admin)
>>
>> Em 17/06/2016 13:17, Tran escreveu:
>>
>> Dear you guys,
>>
>> So currently I set up cartridge and try to make an E-Commerce website. I 
>> already set up testing payment on Stripe However, when I test placing an 
>> order, the check-out page does not redirect me to the complete page (which 
>> it is supposed to do). Instead, I got into error although when I check in 
>> my admin page as well as on Stripe, the order was place. Attached is the 
>> screenshot of my order steps along with the error and how it should be. 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mezzanine-use...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.