Shipping Methods Problem

98 views
Skip to first unread message

Michael Sulubani

unread,
Nov 4, 2023, 2:51:20 AM11/4/23
to django-oscar
Hi guys.
I am trying to add 3 shipping options in the shipping methods, but these are not appearing when I run the server.

I will try to describe what I have done so far.

1. I installed Django Oscar from scratch which gave me the following repo structure
frobshop>
        __init__.py
        config.py
        defaults.py
        manage.py
        frobshop>
              __init__.py
              settings.py
              asgi.py
              urls.py
              wsgi.py

2. With this we can see that there are no folders, nor files for the oscar apps as they are specified in the settings.py. So I created a root module under which all my forked apps will live, using the mkdir in cmd and i called it 'frapps'. I also created the __init__.py file inside of it.

3. I forked the checkout app using : python manage.py oscar_fork_app checkout frapps
I had a look at the github repo for oscar and noticed that the folders for the checkout and shipping app have more files that what has been created from my forking.

At this point I am now lost.

The 3 shipping methods I am trying to create are shown below as suggested by  gpt4.
I really dont know how and where to go after having forked the apps. Can someone please guide me?
class PickUpAtStore(abstract_models.AbstractShippingMethod):
    code = 'pick-up-at-store'
    name = _('Pick up at store')

    def calculate(self, basket):
        return D('0.00')  # No charge for pick up at store

class Yango(abstract_models.AbstractShippingMethod):
    code = 'yango'
    name = _('Yango')
    # Other fields and logic for calculation based on volume

class PowerTools(abstract_models.AbstractShippingMethod):
    code = 'powertools'
    name = _('PowerTools')
    # Other fields and logic for calculation based on volume

Ben Stähli

unread,
Nov 4, 2023, 3:06:53 AM11/4/23
to django...@googlegroups.com
After 3, you would basically just add what you need, for your forked
checkout app (that's why it's almost empty). The rest will still live
in original oscar - that's the cool, because you only change what you
really need to.

Don't forget to change INSTALLED_APPS, to have your own checkout in it.

I cant comment on GPT4 suggestions, they are very vague. But looking
for examples in the official docs and on the internetz helped for me (a
while ago ;-).

Goog luck!
Ben
> --
> https://github.com/django-oscar/django-oscar
> http://django-oscar.readthedocs.org/en/latest/
> ---
> You received this message because you are subscribed to the Google
> Groups "django-oscar" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to django-oscar...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/django-oscar/683e6073-9c36-48a8-891b-a37e22db8baan%40googlegroups.com
> .

Michael Sulubani

unread,
Nov 4, 2023, 3:32:08 AM11/4/23
to django-oscar
Hi Ben

That's the thing. Add what I need is where my issue lays. What files etc. I am relatively new to Django and Oscar, so need someone to say 'right, here you will need a methods.py for example where you will add etc', then explain how it needs to be linked in any other file like admin.py or urls etc. Trust me, I have read the docs, but yeish.
I have challenges in this area mainly.



Ben Stähli

unread,
Nov 4, 2023, 3:39:54 AM11/4/23
to django...@googlegroups.com
I know these struggles well.
But you'll need to master the basics first. For example, if you don't
have a clue, you'll need to step back and fix your knowledge in basic
Django first. Read the docs (Django's is excellent), or the code
(sometimes better, for example at oscar, I always read code and docs,
otherwise I'm lost).

It's a lot of work! But it will pay in the end, you'll know what you
do. If I tell you, you probably won't...
> https://groups.google.com/d/msgid/django-oscar/33757b8b-33de-422d-ac9c-a3b6ddbaa272n%40googlegroups.com
> .

--
Ben Stähli
bnzk GmbH | +41 22 575 25 77 | bnzk.ch
--

Michael Sulubani

unread,
Nov 4, 2023, 3:53:56 AM11/4/23
to django-oscar
Thanks again Ben.
You are absolutely right, and I am learning Django. The reason I am on here is because I am simply a project manager who has a deadline of tomorrow just for the shipping section of the project.
The developers got fired due to lack of budget, so I am doing everything myself, so far so god. Managed to migrate onto superbase, next I will be dealing with Solr, and eventually deploy on Heroku. It is simply this section with the shipping where i ideally needed someone to step in to make sure we are good for tomorrows deadline.
Don't know if I will be able to read and sort it all out today...I probably can, but before it's too late, I thought I'd reach out for help.
Sorry for the extra details. 

Ben Stähli

unread,
Nov 4, 2023, 4:15:34 AM11/4/23
to django...@googlegroups.com
That explains a lot.

I'll gladly give you pointers, but cannot dive into details. Otherwise,
I would work for free, and support your managements decision...I want
neither of it ;-)

You could use a site like codementor.io, to get paid support, that
would still be a lot cheaper than a full time developer.

Sebastian Jung

unread,
Nov 4, 2023, 4:21:15 AM11/4/23
to django...@googlegroups.com
Hello Ben,

I disagree with Support of codementor or upwork. Any developer i have hired have no or not enough experience with django oscar. Most developer have big problems and must learn self much things with django oscar. 

Good luck to implement shipping till tomorrow.

Ben Stähli

unread,
Nov 4, 2023, 4:39:31 AM11/4/23
to django...@googlegroups.com
Thanks Sebastian!
I should have pointed out that I've only considered using codementor,
but not done so yet...so, your input is extra valuable!
Message has been deleted

Michael Sulubani

unread,
Nov 4, 2023, 4:44:50 AM11/4/23
to django-oscar
Well my email is mwanana.sulubani, and i use gmail in case you are willing to get paid for just the shipping method implementation and making sure it works fine.
Not sure if this group accepts us talking about paid work, if not, I apologize, and please ignore. But my email is there if you're willing.
Thanks

Ben Stähli

unread,
Nov 4, 2023, 4:46:25 AM11/4/23
to django...@googlegroups.com
sorry, but queue is filled up!

On Sat, 2023-11-04 at 01:43 -0700, Michael Sulubani wrote:
> Well my email is mwanana....@gmail.com in case you are willing
> to get paid for just the shipping method implementation and making
> sure it works fine.
> Not sure if this group accepts us talking about paid work, if not, I
> apologize. But my email is there if you're willing.
> Thanks
>
> On Saturday, 4 November 2023 at 10:39:31 UTC+2 Ben Stähli wrote:

Michael Sulubani

unread,
Nov 4, 2023, 4:49:39 AM11/4/23
to django-oscar
Okay

Sebastian Jung

unread,
Nov 4, 2023, 6:54:27 AM11/4/23
to django...@googlegroups.com
Hello,

I can implement it but i must know how it should be works. So i have an idea what is to do...

Regards

Reply all
Reply to author
Forward
0 new messages