%s
%s
"%(self._mData.get('title') or "",self._mData.get('body')) + mail_id = Partner.message_post(body=ask_Query, message_type='comment',subtype="mail.mt_comment",author_id=response.get('customerId')) + if mail_id: + result = {'message':_('Seller query is posted Successfully'),'success':True} + else: + result = {'message': 'Something went wrong in posted query', 'success': False} + else: + result = {'success': False, 'message': 'Customer is not a seller !!!'} + response.update(result) + return self._response('sellerAsk', response) + + @route(['/mobikul/marketplace/seller/product'], csrf=False, type='http', auth="none", methods=['POST']) + def sellerProduct(self, **kwargs): + response = self._authenticate(True, **kwargs) + if response.get('success'): + PartnerObj = request.env['res.partner'].sudo() + Partner = PartnerObj.browse(response.get('customerId')) + TemplateObj = request.env['product.template'].sudo() + if Partner and Partner.seller: + local = response.get('local', {}) + domain = [('marketplace_seller_id', '=', response.get('customerId'))] + if self._mData.get('state'): + domain += [('status', '=', self._mData.get('state'))] + productDetailsCount = TemplateObj.search_count(domain) + productDetails = TemplateObj.search(domain,limit=self._mData.get('limit',response.get('itemsPerPage',5)), offset=self._mData.get('offset',0), order="id desc") + slr_product = [] + for prd in productDetails: + temp = { + "name": prd.name, + 'templateId':prd.id, + 'state': prd.status, + 'thumbNail' :_get_image_url(self.base_url, 'product.template', prd.id,'image'), + 'seller': prd.marketplace_seller_id.name, + 'qty': prd.qty, + 'priceUnit': _displayWithCurrency(local.get('lang_obj'),prd.list_price, local.get('currencySymbol',""), local.get('currencyPosition',"")), + } + slr_product.append(temp) + result= {'success': True,'sellerProduct':slr_product,"tcount":productDetailsCount,"offset":self._mData.get('offset',0)} + else: + result = {'success': False, 'message': 'Customer is not a seller !!!'} + response.update(result) + return self._response('sellerProduct', response) + + + @route(['/mobikul/marketplace/seller/dashboard'], csrf=False, type='http', auth="none",methods=['GET']) + def sellerDashboard(self, **kwargs): + Mobikul = request.env["mobikul"].sudo() + response = self._authenticate(True, **kwargs) + if response.get('success'): + PartnerObj = request.env['res.partner'].sudo() + Partner = PartnerObj.browse(response.get('customerId')) + if Partner and Partner.seller: + sellerData = Mobikul.sellerDashboardData(seller_Obj=Partner) + result = {'success': True,'sellerDashboard': sellerData} + else: + result = {'success': False, 'message': 'Customer is not a seller !!!'} + response.update(result) + return self._response('sellerDashboard', response) + + @route(['/mobikul/marketplace/seller/terms'], csrf=False, type='http', auth="none", methods=['GET']) + def sellerTermCond(self, **kwargs): + response = self._authenticate(False, **kwargs) + term_and_condition = request.env['website'].sudo().get_mp_config_settings_values().get('term_and_condition',False) + if response.get('success'): + result = { + "term_and_condition":term_and_condition and remove_htmltags(term_and_condition) or "", + } + response.update(result) + return self._response('sellerTermCond', response) + + + @route(['/mobikul/marketplace/become/seller'], csrf=False, type='http', auth="none", methods=['POST']) + def becomeSeller(self, **kwargs): + Mobikul = request.env["mobikul"].sudo() + UserObj = request.env['res.users'].sudo() + response = self._authenticate(True, **kwargs) + if response.get('success'): + user = UserObj.browse([response.get('userId')]) + if not user.partner_id.seller: + if self._mData.get('url_handler') and Mobikul.checkSellerUniqueUrl(self._mData.get('url_handler')): + Mobikul.set_marketplace_group_user(user) + user.partner_id.seller = True + user.partner_id.url_handler = self._mData.get('url_handler') + user.partner_id.country_id = self._mData.get('country_id') + result ={'success': True, 'message': 'Successfully became a seller'} + else: + result ={'success': False, 'message': _("Seller profile 'url_handler' is not unique or absent.")} + else: + result ={'success': False, 'message': 'Customer is already a seller' } + response.update(result) + return self._response('becomeSeller', response) + + + @route(['/mobikul/ShippingMethods'], csrf=False, type='http', auth="none", methods=['GET']) + def getAvailableShippingMethods(self,**kwargs): + response = self._authenticate(True, **kwargs) + if response.get('success') and response.get('addons', {}).get('website_sale_delivery'): + PartnerObj = request.env['res.partner'].sudo() + Partner = PartnerObj.browse(response.get('customerId')) + SaleOrder = Partner.last_website_so_id + ShippingMethods = SaleOrder.sudo()._get_delivery_methods() + if ShippingMethods: + local = response.get('local', {}) + result = [] + for method in ShippingMethods: + result.append({ + "name": method.name, + "id": method.id, + "description": method.website_description or "", + "price":_displayWithCurrency(local.get('lang_obj'), method.rate_shipment(SaleOrder).get('price'), + local.get('currencySymbol', ""), local.get('currencyPosition', "")), + }) + result = {'ShippingMethods':result} + else: + result = {'success':False, 'message':'No Active Shipping methods found.'} + else: + result = {'success':False, 'message':'Website Sale Delivery is not install.'} + response.update(result) + return self._response('getAvailableShippingMethods', response) diff --git a/ext/3rd-party-addons/mobikul/data/demo_data_view.xml b/ext/3rd-party-addons/mobikul/data/demo_data_view.xml new file mode 100755 index 00000000..cf1ada16 --- /dev/null +++ b/ext/3rd-party-addons/mobikul/data/demo_data_view.xml @@ -0,0 +1,70 @@ + +
+
+ + If you are running your eCommerce(website) on Odoo, and looking for the native mobile application then you are at right place. +
++ Mobikul Mobile App Builder for Odoo will convert your Odoo store in the native mobile applications. It is not necessary to have desktops/laptops to shop from your store. The Mobile App is fully compatible with default Odoo store. +
++ The mobile application provides a user-friendly experience and enhances the customer`s engagement over the mobile platform. +
++ Now the customers can visit your store by using their mobile only and can shop on the Go. +
++ So what you waiting for, you must have a mobile app with great features & functionalities for your Odoo store. +
+ ++ Need Demo ?? Check following links... +
+( Please don`t forget to share your reviews on playstore & here as well. Your opinions, comments and suggestions are VERY Important to keep this app updated and more usefull !!! )
++ Just set up this app once in your odoo back-end and you are ready to go +
++ Configure this App from Odoo back-end. +
++ Admin can disable signup/reset-password from App. +
++ All types of products are supported i.e with or without attributes like color,size, etc +
++ Option to published/un-published products/categories on App separately from Website. +
++ Product can have more than one images, with Zoom-in,Zoom-out feature.Optimized images for faster loading. +
++ Via Odoo pricelist, you may have special discount on your product(s) if purchased from App only or vice-versa. +
++ you can keep tracking from which plateform(Website/App) your customers bought your products more. +
++ Manage the translations for the components in your app from backend +
+ ++ We offer extremely convenient and quick support service to all your technical help & support requests. +
++ Manage Unlimited Product Sliders like New Products, Hot Deals, etc. +
++ Configure the selection criteria of products - automatic(new products, etc) or manual. +
++ Manage slider mode i.e fixed or sliding +
+
+ + Manage Unlimited Featured Category. +
++ Highlight popular category on homepage, by making them Featured from Odoo. +
++ Convert any category to featured or vice-versa from Odoo. +
+
+ + + OAuth2 Authentication + + + + + (read more) + +
+ ++ + + Website Wishlist + +
+ + + ++ On purchasing this module, you`ll get .apk without Source Code(Need to create a Ticket). +
++ You can publish this App through Webkul Google Play Store Account. +
++ You will get 90 days FREE support for any doubt, queries, and bug fixing (excluding data recovery) or any type of issue related to this module. +
+ Click to add a new Push Notification for your Mobikul App. +
++ Click to add a new Push Notification Templates for your Mobikul App. +
++ Click to add a new Banner for your Mobikul App. +
++ Click to add a new Category for your Mobikul App. +
++ Click to add a new Featured Category for your Mobikul App. +
++ Click to add a new Product Slider for your Mobikul App. +
++ Click to add a new Notification Messages for your Mobikul App. +
+