Hi Eduado, Is there a straightforward tutorial on how to customize the Cartridge/Mezzanine shop/products model? e.g. I need more options showing on the shop page to make an order. Particular questions: I didn't find the model.py and view.py in the project, what are the steps I supposed to do if I want to customize it and make it working?
<https://lh3.googleusercontent.com/-RSNOvxNMfb4/Wmi1W3yS19I/AAAAAAAAHJg/S5OF7fXY6zEVaJuhRodO-wG2c-rAqirJwCLcBGAs/s1600/homepage.PNG> e.g. I don't want to show the home page instead showing a page that I customized from the moderna template (Which I customized just showed above), and I want to just clicking each menu and linked it to a shop page which can make an order. Would you able to provide a tutorial and guidance on how to getting there. Looking forward to hearing from you all. Peter On Saturday, September 23, 2017 at 10:14:30 PM UTC-5, Eduardo Rivas wrote: > > To extend templates: Create a template in your project under the same path > as the Cartridge template. For example, if you want to provide your own > template for Products, create a template in > your_app/templates/shop/product.html. Here's an explanation of Django's > template loading: > https://docs.djangoproject.com/en/1.11/ref/templates/api/#django.template.loaders.app_directories.Loader > > Here are all the Cartridge templates you can override in your own project: > https://github.com/stephenmcd/cartridge/tree/master/cartridge/shop/templates > > To extend views: You can create your own views and register them in the > same URL pattern as the view you want to override. If you want to override > the view that renders the checkout page, you can register your own view at > the /shop/checkout path. Make sure your overriden views are registered > before the Cartridge urlpatterns. For example > > url("^shop/checkout/", my_views.my_custom_checkout, name="shop_checkout") > > Here's Cartridge's url config which lists all urls managed by Cartridge: > https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/urls.py > > To override models you can use Mezzanine's field injection, documented > here: http://mezzanine.jupo.org/docs/model-customization.html. Notice > this is useful only to add new fields to a model, not to remove or alter > existing fields. For that you might need to maintain your own fork. > > Finally, remember Cartridge comes with a bunch of settings you can > customize to modify it's behavior, you can review them all here: > http://cartridge.jupo.org/configuration.html > On 2017-09-23 5:19 PM, jenia mtl wrote: > > Hello. > > I want to change cartridge a little. Change the templates, change the > views and do on. > > I did it by changing the code of the app itself. But I do not think it's > the best idea for obvious reason (when the app will be upgrades, I'll be > hard to merge my changes for example). > > How do I extend Cartridge? Is there a mechanism to extend, override and so > on Cartridge? > > Thanks > -- > 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 [email protected] <javascript:>. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
