django-oscar

OSCAR_SEARCH_FACETS for filtering product lists

孤者浪人 提交于 2019-12-13 11:49:37
问题 I am working on an ecommerce website using django oscar. Products are listed and I have to apply filters (e.g. year, price, etc.). Can we use oscar facet for this filtering functionality? I have tried adding following as per oscar documentation, but don't know how to make it work and render on my front end. OSCAR_SEARCH_FACETS = { 'fields': OrderedDict([ ('product_class', {'name': _('Type'), 'field': 'product_class'}), ('rating', {'name': _('Rating'), 'field': 'rating'}), ]), 'queries':

Type geometry does not exist after CREATE EXTENSION postgis

吃可爱长大的小学妹 提交于 2019-12-12 15:43:06
问题 After creating new postgres db and loading necessary postgis extension $ createdb demodb $ psql demodb > CREATE EXTENSION postgis; > CREATE EXTENSION postgis_topology; I get django.db.utils.ProgrammingError: type "geometry" does not exist exception thrown while running django manage.py migrate After this I tried running the failed query in pgadmin and it said the same: type "geometry" does not exist Although appending CREATE EXTENSION postgis; before the query seems to fix this and query

Adding products in django-oscar homepage

≡放荡痞女 提交于 2019-12-12 09:46:20
问题 I'm trying to figure out the best way to display products inside my homepage. I'm building my website using the sandbox that already comes with django-oscar (I cloned the project from Github). I discovered that the default homepage is controlled by 'promotions' app. However, my products are just being displayed inside 'http://localhost:8000/catalogue' (controlled by 'catalogue' app). Is there a way to display the products in my homepage? Or will I have to change the default app that controls

Best way to import Catalogue from Magento to Django Oscar?

纵然是瞬间 提交于 2019-12-12 06:17:33
问题 I have an existing system in Magento and I'm moving to Django Oscar. Found this in the Oscar docs. This works for a certain structure of the csv file. The csv export that I get from Magento is totally different. What is the best way to migrate a catalogue from Magento to Oscar ? Also there is also a 3rd party app Oscar Parachute too which is for migration but I don't know if that works for Magento export. 回答1: Ended up using the Magento xmlrpc API using this Interface. Works well with some

Django-oscar installation as new project with oscar files on project directory

一世执手 提交于 2019-12-12 01:36:55
问题 I would like to start a new Project in Django. I want to use some django-oscar apps from Github. Django-oscar already providing a [pip infall django-oscar] command to install it. But this time osacar files goes to site-package directory. I want them in my current project directory. Is there any solution. 回答1: Clone the github project, and then run make sandbox , it will install the requirements but it won't install/copy the oscar app to the site-packages folder. It will use it from where it

django oscar: How to send an email to store admin for order placement notification [duplicate]

别等时光非礼了梦想. 提交于 2019-12-12 00:35:17
问题 This question already has an answer here : Django Oscar - email admin on order placed (1 answer) Closed 18 days ago . I want to get a notification email to myself (As Admin) when there is new order placed on my django-oscar store. 回答1: I think that you can use django signals. Django-Oscar has some signals defined for multiple actions, and one of them is associated to the action of order placed. This signal provide information about the order made and the user who made the order. You can use

Django Oscar user verification email

做~自己de王妃 提交于 2019-12-11 08:07:28
问题 I have a simple installation of Django Oscar project. I would like to know how to send user verification email so that all new users registered email IDs can be verified? By default Oscar registers new users and sends registration email to users. 回答1: Registration email function in RegisterUserMixin class (customer -> mixin), It use in customer view. so You want to override form_valid function in AccountRegistrationView class (customer -> views.py) 来源: https://stackoverflow.com/questions

How to add few payment methods to django-oscar

元气小坏坏 提交于 2019-12-09 07:11:28
问题 I already add cash_on_delivery payment method to my project. But i want to add one more method. How i can do it. At this moment i have code of checkout views like this: class PaymentDetailsView(PaymentDetailsView): template_name = 'checkout/payment-details.html' template_name_preview = 'checkout/preview.html' def get_context_data(self, **kwargs): ctx = super(PaymentDetailsView, self).get_context_data(**kwargs) ctx['signature'] = gateway.hmac_gen(ctx) ctx['amount'] = '%s' % ctx['order_total']

Automatically setup Apache Solr with Django - Oscar on AWS Elastic Beanstalk

≯℡__Kan透↙ 提交于 2019-12-08 17:51:19
问题 I need to ensure that Apache Solr is installed with my django-oscar application, and have been using these instructions with an .ebextensions config file to automatically install Solr and rebuild the index. Here is the .ebextensions/03_solr.config container_commands: 01_install_solr: command: "wget http://archive.apache.org/dist/lucene/solr/4.7.2/solr-4.7.2.tgz && tar xzf solr-4.7.2.tgz && cd solr-4.7.2.example/solr/collection1 && mv conf conf.original && ln -s /opt/python/current/app/deploy

Filtering Objects in a View in Django - Oscar?

孤街浪徒 提交于 2019-12-06 13:33:41
问题 Trying to implement a simple ordering query on ProductCategoryView in Django-Oscar. It should be fairly simple to implement but it's taking too much time to understand. I'm having second thoughts to go forward with Oscar or not as it seems difficult to extend. The ProductCategoryView returns products of a certain category. I want to sort them according to certain field in product model say price . First I change the parent generic class from TemplateView to ListView so that I can use get