Re: [mezzanine-users] Figuring out how to implement user-defined product sort order in Cartridge

2016-04-07 Thread Eduardo Rivas
I've used Django admin sortable 
(https://github.com/iambrandontaylor/django-admin-sortable) to add 
drag-n-drop ordering to models that are not inlines. It adds a new 
button to the list display where you can do the sorting.


--
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] Figuring out how to implement user-defined product sort order in Cartridge

2016-04-07 Thread Danny
On 8 April 2016 at 13:21, Sam W  wrote:

> So I end up doing a lot of weird stuff with Cartridge, but something a bit
> more normal has been plaguing me recently; user-defined sort orders for
> products in Cartridge's categories.
>
> Basically, clients' sales staff want to be able to manually drag and drop
> products in categories to change their initial order when the page loads.
> At the moment, they're doing all sorts of stuff to achieve this, including
> unloading and reloading products so that "recently added" does what they
> want. D:
>
> Obviously this is not a normal feature in Cartridge for a bunch of
> reasons, but I was wondering if anyone else had run into this before, and
> if so how you worked around it.
>
> As I'm already customising cartridge, that's the approach I'll likely end
> up taking. It seems like the ideal way to do it is to make products
> orderable with respect to categories and then find a way to add a
> product-order widget to the category page in the admin that will update the
> category-respective order of products when edited. The latter part is the
> most difficult part of the implementation for me, as adding custom widgets
> to the grappelli is not exactly my strong suite. Does anyone have any
> advice on that subject?
>
>
I've customised cartridge as well, and one of the things I did was add an
'ordering' field to the model (I did at first try subclassing Orderable but
it wasn't successful). Then in the Products Admin, I've allowed the
ordering field to be visible/editable so an admin can numerically change
the order of the products. This isn't per category, it's overall, but it's
enough for me.

In the category template, I've removed the sort dropdown, so the only order
that products appear in is the default (which I've set to be based on
'ordering') and that way the products appear in the order I want them.

It's a simple and crude solution, but it's enough for me.

I think if you want drag-and-drop ordering you may want to *start* by
making the Product class subclass Orderable, but to provide that drag-drop
feature, you'll have to adapt the TabularDynamicInline javascript behaviour
to apply to a top level model (rather than an inline). I could never get
the drag/drop ordering to work on any top-level model, so I just gave up
and decided to use numeric ordering as it was simpler for me.

Seeya. Danny.

-- 
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] Cartridge checkout modifications #2

2016-04-07 Thread Bruno Barbosa
hello Joseph,

Though this article are in portuguese, it explains how to integrate paypal
with cartridge.
http://thiagopagonha.appspot.com/blog/configurar-e-customizar-o-e-commerce-cartridge/

maybe it help you =)

best regards

--
Bruno Barbosa
Web Developer
*brunobarbosa.com.br *

On Thu, Apr 7, 2016 at 9:38 AM, Joseph Mohan  wrote:

> I need to be able to pretty much completely remove the shipping/billing
> form. So the user would click the product, got to product page, "buy", show
> checkout, and then skip straight to payment (which is paypal)
>
> The reason for this is the user has to sign in to paypal separately, and
> none of the data from the billing/shipping is ever used.
>
> Please help
>
>
> --
> 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.


Re: [mezzanine-users] Cartridge checkout modifications #2

2016-04-07 Thread Ken Bolton
Hi Joe,

I know very well how you feel. I compiled my first open source project from
source in 1994, went "full time" with software development in 2008, have
been *de facto* CTO of a tiny startup for about three years, yet still feel
like a dilettante most days. And every day I recognize how much more there
is to learn.

In my (very old) project, I copied
https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/views.py#L208-L341
wholesale, then tortured it to suit my needs and added a url pattern to hit
it, which is exactly the path you took. I also created a custom OrderForm
which subclassed FormsetForm and DiscountForm, which was critical because I
was adding HTML5 placeholders before Mezzanine had those baked in.

Regarding Paypal,
https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/payment/paypal.py#L86-L105
requires the billing data.

-ken

On Thu, Apr 7, 2016 at 9:29 AM, Joseph Mohan  wrote:

> I've been trying to go at it from urls.py, aiming to pass the
> checkout_step to a view, something like:
>
> url("^shop/cart/$", "cartridge.shop.views.checkout_steps", name =
> "checkout_steps", kwargs=dict(step='confirmation')),
>
> but failing miserably!
>
> I understand that i could subclass OrderForm and hide/remove fields but it
> would still add an extra step/page.
>
> I am definitely struggling to truly understand the flow of cartridge, (but
> learning everyday, absolutely love mezzanine-cartridge) but am punching
> above my weight a little (self taught coder of about 2-3 years)
>
> Thanks for your quick reply, Joe
>
> On Thursday, 7 April 2016 14:00:24 UTC+1, Kenneth Bolton wrote:
>>
>> What have you tried so far?
>>
>> What you want to do is not difficult. Write views, forms, urls, and
>> templates following the examples provided in the source of Mezzanine &
>> Cartridge. Reading and understanding the Cartridge source is critical; once
>> you grok the flow, most features are fairly trivial to implement.
>>
>> -ken
>>
>> On Thu, Apr 7, 2016 at 8:38 AM, Joseph Mohan  wrote:
>>
>>> I need to be able to pretty much completely remove the shipping/billing
>>> form. So the user would click the product, got to product page, "buy", show
>>> checkout, and then skip straight to payment (which is paypal)
>>>
>>> The reason for this is the user has to sign in to paypal separately, and
>>> none of the data from the billing/shipping is ever used.
>>>
>>> Please help
>>>
>>>
>>> --
>>> 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.
>

-- 
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] Cartridge checkout modifications #2

2016-04-07 Thread Joseph Mohan
I've been trying to go at it from urls.py, aiming to pass the checkout_step 
to a view, something like:

url("^shop/cart/$", "cartridge.shop.views.checkout_steps", name = 
"checkout_steps", kwargs=dict(step='confirmation')),

but failing miserably! 

I understand that i could subclass OrderForm and hide/remove fields but it 
would still add an extra step/page.

I am definitely struggling to truly understand the flow of cartridge, (but 
learning everyday, absolutely love mezzanine-cartridge) but am punching 
above my weight a little (self taught coder of about 2-3 years)

Thanks for your quick reply, Joe

On Thursday, 7 April 2016 14:00:24 UTC+1, Kenneth Bolton wrote:
>
> What have you tried so far?
>
> What you want to do is not difficult. Write views, forms, urls, and 
> templates following the examples provided in the source of Mezzanine & 
> Cartridge. Reading and understanding the Cartridge source is critical; once 
> you grok the flow, most features are fairly trivial to implement.
>
> -ken
>
> On Thu, Apr 7, 2016 at 8:38 AM, Joseph Mohan  > wrote:
>
>> I need to be able to pretty much completely remove the shipping/billing 
>> form. So the user would click the product, got to product page, "buy", show 
>> checkout, and then skip straight to payment (which is paypal)
>>
>> The reason for this is the user has to sign in to paypal separately, and 
>> none of the data from the billing/shipping is ever used.  
>>
>> Please help
>>
>>
>> -- 
>> 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.


Re: [mezzanine-users] Cartridge checkout modifications #2

2016-04-07 Thread Ken Bolton
What have you tried so far?

What you want to do is not difficult. Write views, forms, urls, and
templates following the examples provided in the source of Mezzanine &
Cartridge. Reading and understanding the Cartridge source is critical; once
you grok the flow, most features are fairly trivial to implement.

-ken

On Thu, Apr 7, 2016 at 8:38 AM, Joseph Mohan  wrote:

> I need to be able to pretty much completely remove the shipping/billing
> form. So the user would click the product, got to product page, "buy", show
> checkout, and then skip straight to payment (which is paypal)
>
> The reason for this is the user has to sign in to paypal separately, and
> none of the data from the billing/shipping is ever used.
>
> Please help
>
>
> --
> 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] Cartridge checkout modifications #2

2016-04-07 Thread Joseph Mohan
I need to be able to pretty much completely remove the shipping/billing 
form. So the user would click the product, got to product page, "buy", show 
checkout, and then skip straight to payment (which is paypal)

The reason for this is the user has to sign in to paypal separately, and 
none of the data from the billing/shipping is ever used.  

Please help


-- 
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.