Quantcast
Channel: Webkul Blog
Viewing all 5488 articles
Browse latest View live

Odoo Bridge For Magento ( MOB ) Credit memo

$
0
0
Return of a Product by customer and Refund of its invoice is one of the crucial part of any E-Commerce. Thus, In order to manage Return and Refund efficiently, We have introduced our Credit memo module which helps the user to manage the order refund easily. Now a return request from Magento end will create an invoice credit and delivery return for the same order on odoo’s end. User can use this module to manage credited invoice and stock return with an ease of automation. From Magento to Odoo order return synchronize in real time, it is a one way process.
Prerequisites: MOB Credit Memo For Magento module depends upon our Magento-Odoo Bridge (MOB) Base module. You need to install it before you can use this maintenance module.

Features

  • Real time synchronization of Order Refund from Magento to Odoo.
  • Generation of Credit invoice for the corresponding order refund in odoo.
  • Delivery return or return inward takes place for the order refund.
  • List of customer refund is maintained under accounting.

Installation

Inside the zip file of the module, User will find two folders, “Magento Module” and “Odoo Module”.

Magento end

➢ Place “Magento Module” folder inside Magento directory.

➢ Then do cache management by going through the following path-

“System -> Cache Management”

➢ After clearing cache,Logout and then re-login to Magento. Refund Configuration tab will get visible under System>Odoo Configuration.

odoo end

➢ Place the “Odoo Module” folder inside your Odoo addons.

➢ Enable developer mode.


➢ Go to Apps>Update Apps List and Proceed with the Installation.

Configuration

Default setting

➢ At Magento end Go to system > Inventory.

➢  Allow the setting to automatically return the credit memo items on stock.

Refund configuration

Under system > refund configuration, admin can allow the settings for automatic invoice refund and automatic delivery return in odoo.

If “Automatic Invoice Refund Odoo” option is set “yes”,  Order at Odoo end will be refunded as soon as Credit Memo is generated at Magento end.

If “Automatic Delivery Return” option is set “yes”, At the creation of Credit Memo at Magento end, Delivered order at Odoo will get returned and If the delivery order at Odoo is not at done state then Odoo order and delivery will be cancelled.

Workflow

Magento end

creating a credit memo for order refund

When an order is invoiced at Magento end, user can simply click on “Credit Memo” button in order to generate an order refund.

notification for successful refund

When user will be successfull in generating a credit memo, a notification will appear mentioning the order reference which synchronizes at the odoo end too for the credit invoice created.

Odoo end

specific order view

At Odoo end for a particular order, User can view the success messages for invoice refund and delivery return as shown in the image below

Under sales order of a particular order, refunded option will be seen as marked.

Accounting list of Customer Payments

Under accounting list view of customer payments as shown below, reflects the invoice generated with a corresponding credit invoice for the order refund.

Support

For any kind of technical assistance, just raise a ticket at : https://webkul.uvdesk.com and for any doubt contact us at support@webkul.com

 


@future Annotation In Salesforce

$
0
0

In this blog we will learn about @future annotation. In salesforce there is several method to run the process asynchronously. @future annotation is one of the way. It run the process in separate thread.

Key Points:

  1.  The method annoted with @future is known as future method.
  2.  Future method :
    1.  can only return void type.
    2.  must be static method.
    3.  cannot take objects and sOjects as parameter.
    4.  allow callout when callout = true is specified.(Default is callout = false).
      public class exampleClass
      {
          /**
          * Webkul Software.
          *
          * @category  Webkul
          * @author    Webkul
          * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
          * @license   https://store.webkul.com/license.html
          */
      
          @future (callout = true)
          public static void exampleCallout()
          {
            //Write your code here.
          }
      }
  3.  Specified parameter must be primitive data types, arrays of primitive data types, or collections of primitive data types.
  4.  Method may or may not be executing in same order as it is called.
  5.  It cannot be used in visualforce controller either in getMethodName() or in setMethodName() nor in constructor.
  6.  Nested future calling is not allowed means you cannot call a future method in another future method niether in trigger.

Where To Use :

  1. When you have to make callout to external web-services after DML operation from trigger because it hold the database connection open for lifetime.
  2. Due to sort of resource some method need to run in their own thread, so that it can use that resources when they are available, there you can use future annotation.
  3. Due to limited user’s access on record sometimes DML operation on certain sObject cannot be mixed with DML operation on another sObjects. At that time we need to change the transaction of both DML operation. Here we can use future method.

GOVERNOR Limits

  1. Maximum number of methods with the future annotation allowed per Apex invocation is 50.
  2. No more than 200 method calls per Salesforce.com license per 24 hours

 

Example:

Below is an example of future method. In this example you will create an custom field name Number_Of_Contacts___c of type number in Account sObject and update this field using future method as explained below.

  1. You have to create an custom field from Setup>> Customize>>Accounts>>Fields. Create new custom field name Number_Of_Contacts__c and type should be Number.
  2. Now create an apex class AccountProcessor to update the number of Contacts in each Account.
    public class AccountProcessor {
      
        /**
        * Webkul Software.
        *
        * @category  Webkul
        * @author    Webkul
        * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
        * @license   https://store.webkul.com/license.html
        */
        
        @future
        public static void countContacts (List<Id> accountIds)
        {
            List<Account> accountList = new List<Account>();
            for(Id accId : accountIds)
            {
                Account acc = [Select Name from Account where Id =: accId];
                acc.Number_of_Contacts__c = [Select count() from Contact where AccountId =: accId];
                accountList.add(acc);
            }
            update accountList;
        }
        
        public AccountProcessor ()
        {
            List<Account> accList = [Select Id from Account];
            List<Id> accountIds = new List<Id>();
            for(Account acc: accList)
            {
                accountIds.add(acc.Id);
            }
            AccountProcessor.countContacts(accountIds);
        }
    }
  3. Now open Execute Anonymous window (Ctrl+E) and execute the following code.
    AccountProcessor a = new AccountProcessor();

Now, go to Accounts and check the updated record. You will find total number of contact associated with that account in Number_Of_Account custom field.

Output:

 

Support

That’s all for @future Annotation, still if you have any further query , feel free to add a ticket, we will be happy to help you https://webkul.uvdesk.com/en/customer/create-ticket/.

 

Validation Rule In Salesforce

$
0
0

In this we will learn about Validation Rule with an example.It is  some criteria  which is defined to validate the data entered by user while creating or manipulating the records. This event fire right after clicking the save button. It can contain the formula or expression that validate the data and return ‘true’ or ‘false’. It can also return error message associated with that particular validation rule which will display to user when he enter invalid data.You can create validation rules for objects, fields, campaign members, or case milestones.

Steps:

Follow the step to create a validation rule for object.

  1. Goto SetUp>>Customize>>Account(Any Object).
  2. From left sidebar click validation rule.
  3. Click New.
  4. Enter the Name of the rule.
  5. In Error Condition Formula section define your criteria to validate the data.
  6. To check the formula or expression for error click on Check Syntax.
  7. In Error Message section define your message and position which will appear when user enter wrong data.
  8. Finally, Save it.

Example:

Now we are going to write validation rule for contact object which fires when contact is save. This rule validate whether contact’s age is more than 18 years or not. This will through error when contact’s age is less than 18.

  1. Goto SetUp>>Customize>>Contact.
  2. From left sidebar click validation rule.
  3. Click New.
  4. Enter the Name of the rule i.e. Verify_Age
  5. In Error Condition Formula section define your criteria to validate the data. i.e  Year( Birthdate) > 1999
  6. To check the formula or expression for error click on Check Syntax.
  7. In Error Message section define your message and position which will appear when user enter wrong data. i.e. Contact must be more than or equal to 18 years
  8. Finally, Save it.

Output

 

Support

That’s all for Validation Rule, still if you have any further query, feel free to add a ticket, we will be happy to help you https://webkul.uvdesk.com/en/customer/create-ticket/.

 

Using Dynamic Visualforce Components

$
0
0

If you are a Salesforce Developer then, you must have always thought about, can we use a dynamic label for a field? Or can we create a dynamic table with variable columns according to users? Can we create a dynamic form for, let’s say employee and client? The answer to above question is, yes, we can create such pages, using Dynamic Visualforce Components.

Dynamic Visualforce

First thing first, what are these Dynamic Visualforce Components? Let’s say we want to show a particular column of a table under a specific condition. Option number one is using an ‘If’ expression in the rendered part of that column. But the expression tends to be complicated. Option number two is, creating the same expression in APEX as code, and then simply calling that function in the rendered attribute, which is actually the same as the first one. The third option is completely removing the column from the Visualforce code. Yes, that is what dynamic Visualforce is all about. In simple words, components are created in apex code and then displayed in the Visualforce page.

Now that we have an idea about what Dynamic Visualforce is, let’s create a visualforce page.

APEX Class

For this example I am going to create a page with an option to select which form we want to show, and the form itself. The form will be dynamically created inside the class.

public class DynamicComponentExample {

    /**
     * Webkul Software.
     *
     * @category  Webkul
     * @author    Webkul
     * @copyright Copyright (c) 2010-2017 Webkul Software Private Limited (https://webkul.com)
     * @license   https://store.webkul.com/license.html
     **/
    
    public string selectedform { get; set;}
    public string userId { get; set;}
    
    public DynamicComponentExample(){
        selectedform = 'client';
    }
    
    public list getFormList(){
        list formlist = new list();
        formlist.add(new selectoption('client','Customer'));
        formlist.add(new selectoption('employee','Employees'));
        return formlist;
    }
    
    public Component.Apex.OutputPanel getFormPanel(){
        Component.Apex.OutputPanel op = new Component.Apex.OutputPanel();
        Component.Apex.OutputLabel OpLabel = new Component.Apex.OutputLabel();
        Component.Apex.inputText iptext = new Component.Apex.InputText();
        Component.Apex.CommandButton cmb = new Component.Apex.CommandButton();
        if (selectedform=='client') {
            OpLabel.value = 'Enter Client Id: ';
        } else if (selectedform=='employee'){
            OpLabel.value = 'Enter Employee Id: ';
        }
       	OpLabel.for='idField';
        
        iptext.expressions.value='{!userId}';
        
        if (selectedform=='client') {
            cmb.expressions.action = '{!saveClient}';
        } else if (selectedform=='employee'){
            cmb.expressions.action = '{!saveEmployee}';
        }
        cmb.value='Submit';
        op.childComponents.add(OpLabel);
        op.childComponents.add(iptext);
        op.childComponents.add(cmb);
        return op;
    }
    
    public void saveClient(){
        System.debug('Client Save Action');
    }
    
    public void saveEmployee(){
        System.debug('Employee Save Action');
    }
    
    public void changeForm(){
        system.debug(selectedform);
    }
}

As we can see that the class is just like any normal class, it has a name, a constructor, getter function for select list, and three functions in the end, which are doing nothing, and are used for test purpose only. However there is one function, getFormPanel(), which actually the function responsible for constructing the form which will be displayed in the Visualforce Page.

Class Explanation

The return type of the getFormPanel() function will be the same as the tag that we want to dynamically generate in the form. In this class we can see that the return type is Component.Apex.OutputPanel, which means that the returned tag will be <apex:outputPanel>. The class that is being used in this example is Component class. Component.apex means that the namespace of generated component will be apex. This can be used according to our need, or completely omitted. If you are using the custom component of some other developer, use their namespace here in place of apex.

Next we create a variable of the same type inside the function. We have also created an inputtext, an outputlabel and a commandbutton, which will be displayed inside the form. All the attributes of the components are directly accessible, like value or the for attribute in OpLabel. The attributes which require expression to be used, are written like cmb.expressions.action for the commandbutton action.

Once we are finished creating all the child components, we add them to the op variable with the help of op.childComponent.add(). The components will be shown in exactly the same order they were added.

Visualforce Page

Next up is creating the actual visualforce page which will be rendering the dynamic content.

<apex:page controller="DynamicComponentExample">
    <apex:form>
	    <apex:selectList size="1" value="{!selectedform}">
    		<apex:selectOptions value="{!FormList}"/>
        </apex:selectList>
        <apex:commandButton action="{!changeForm}" value="Show Form"/><br/><br/>
        <apex:dynamicComponent componentValue="{!formPanel}" id="formpanel"/>
    </apex:form>
</apex:page>

Now this Visualforce page is just like any other page, except for one simple thing, it contains a tag <apex:dynamicComponent/> which is used for as a markup to set for the dynamic content which will be displayed inside the page. The value attribute of this tag is referring to the getFormPanel() in our APEX class. Now the form displayed in this page will completely depend on the selected value in select list.

Output

Once the visualforce page is saved you can preview it to see the effects.

To check which function was called for either form, you can check the debug log, where the debug will show the name of the function called.

SUPPORT

That’s all for using dynamic visualforce components, for any further queries feel free to add a ticket at:

https://webkul.uvdesk.com/en/customer/create-ticket/

Or let us know your views on how to make this code better, in comments section below.

How to use HTML attributes in Visualforce

$
0
0

For every Web developer the basic requirement is HTML. This markup language works as the basis of developing any Webpage. Visualforce, also being a web development platform, gives the support of using HTML tags directly. However for that we have to sacrifice some of the standard functionality it provides like the rendered attribute, or the action attribute used in command button. We would always want the ability to use both html attributes and Visualforce tags together. This is what I am going to demonstrate, how to use HTML attributes in Visualforce.

HTML- Pass through

Visualforce gives us the ability to use ‘html-‘ passed through to use attributes which are supported by HTML but are not available in the former. Using this attribute is pretty easy, all we have to do is add ‘html-‘ in the beginning of the attribute that we want to use and the attribute will be passed as it is in the final output of the HTML page.

For example, we have a placeholder attribute in HTML, but <apex:inputtext> does not give the functionality to use the it. In order to get that attribute we will write the tag something like this.

<apex:inputtext html-placeholder="Write Text"/>

Now the placeholder will be visible in the output of the page. You can use this code in your Visualforce page and see the changes.

More Examples

We can also use this pass through with many other attributes, like for example, I have created a page called JS1Clone. The code for this page is as follows:

<apex:page showHeader="false" sidebar="false" docType="html-5.0" controller="testcontroller">
    <apex:form>
        <apex:inputText value="{!emptyvar}" html-placeholder="Name"/><br/><br/>
        <apex:input type="number" html-min="3" html-max="9" html-step="2" value="{!emptynumber}"/><br/><br/>
        <input type="submit" value="Submit"/>
    </apex:form>
</apex:page>

As you can see in this example that the html- passthrough is used to show the placeholder and also the min and max attribute of an input type number.

Also I have created a class for this example, which literally does nothing. It is there to just show the functionality of the attributes.

public class testcontroller {
    public string emptyvar { get; set;}
    public integer emptynumber { get; set;}
    
    public void nothing(){
        
    }
}

Another example is used with iFrame, where the passthrough is used to get it’s attributes.

<apex:page controller="testcontroller" docType="html-5.0" sidebar="false" showHeader="false">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
  	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  	<script> src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <apex:form>

        <apex:iframe html-srcdoc="<p>The iFrame below me contains a form</p>" src="JS1Clone" frameborder="true" height="50px"/>
        <apex:iframe src="JS1Clone" html-sandbox="" height="300px" scrolling="true" frameborder="true"/>

        <apex:outputLink value="{!$CurrentPage.URL}" html-download="testpage.html" html-media="screen">Download this page</apex:outputLink>
        <apex:outputPanel layout="block" styleclass="progress">
    		<apex:outputPanel layout="block" styleclass="progress-bar" html-role="progressbar" html-aria-valuenow="70" html-aria-valuemin="0" html-aria-valuemax="100" style="width:70%">
      			<apex:outputPanel styleclass="sr-only">70% Complete</apex:outputPanel>
    		</apex:outputPanel>
  		</apex:outputPanel>

        <apex:commandButton reRender="none" styleclass="btn btn-success" html-data-toggle="collapse" html-data-target="div[id*=demo]" value="Simple collapsible"></apex:commandButton>
  			<apex:outputPanel layout="block" id="demo" styleclass="collapse">
    			Lorem ipsum dolor sit amet, consectetur adipisicing elit,
			    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    			quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
  			</apex:outputPanel>
    </apex:form>
</apex:page>

Now in this example we can see that I have used Bootstrap, however attributes like data-target which are required in bootstrap, are not available in Visualforce, so html- can be used to get them to work. The iFrame attributes which are not available in Visualforce are also used with pass through.

Also the target id for collapse is given as a wildcard character, as the output of visualforce pages modifies the id of the components.

Output

The output of the final created page with all the iFrame will look something like this:

Support

That’s all for how to use pass through attribute in Visualforce, for any further queries feel free to add a ticket at:

https://webkul.uvdesk.com/en/customer/create-ticket/

Or let us know your views on how to make this code better, in comments section below.

Mobikul Wallet System

$
0
0

The Mobikul Mobile App supports the Wallet system and will allow the customers to make the online payment from their Wallet System via using the mobile application. Wallet System is an online prepaid account where one can stock up their currency, which can be used for later Online Transactions.

In this add-on, Customer/User can use Wallet Cash during the checkout and money will be deducted from their Wallet Cash. The customers can easily add credit to their wallet system. They can easily make all the transactions by using the mobile app. Admin can set the limit for the Wallet System. Admin can add or deduct the amount from customer’s wallet. Admin can also refund the customer amount through the Wallet System by adding the wallet cash. Both Admin and Customer/Buyer can view the transaction details.

Features Of Mobikul Wallet System

  • Make Online payments using your Wallet.
  • Easily add the Credit to your wallet.
  • Admin can Refund the amount to the customer by adding the wallet cash.
  • Admin can set the limit for the Wallet System.

How to Use – Wallet System

Now, the Mobikul app users can make use of the wallet system inside their app and feel free to make purchases on the go without having to carry along the cash.

Mobikul Wallet  –

The customers need to login to their account and after that, they can tap the “My Wallet” menu option to check their wallet.

Clicking “My Wallet” brings up the section to add the amount to the wallet or view the wallet balance, and view the credit/debits for the wallet.

 

How to add amount to the Wallet –

This is really easy, just like adding a product to the cart for making a purchase. The customer needs to tap the “Add Money To Wallet ” button to add the money to the wallet. This will add the wallet amount as a product into the cart.

Now, click the “Proceed To Checkout” button to add this amount to your wallet. Move up through all the checkout steps to add the amount as shown in the snapshots below.

After adding the amount, the added amount will be reflected as shown below(after an Order is made as complete via the admin end).

 

How to Make a Purchase Using the Wallet System –

Purchasing via the wallet system is easy. Just add the products that you want to purchase to the cart as normal.

After that, hit the proceed to button to go through the next steps. Under the payment section, you will see “Use Wallet” checkbox. Check the option then select the radion option for the wallet and hit the “Continue” button. Now, you will see the Order Confirmation, click it to complete your order.

 

How to Credit the Customer’s Wallet –

The admin can credit the money to a customers wallet by making a few clicks. To credit the wallet, the admin will click on “Add Credit” button.

Now, select the customer whose wallet is to be credited, enter the amount to be credited for the wallet, and the description. Click the “Submit” button to add the amount to the customer’s wallet.
Heading name goes here

How to Debit the Customer’s Wallet –

The admin can debit the money from a customer’s wallet by making a few clicks. To debit the wallet, the admin will click on “Add Debit” button.
Mobikul-Wallet-System

Now, select the customer whose wallet is to be debited, enter the amount to be deducted, and the description. Click the “Submit” button to debit the amount to the customer’s wallet.
Debit-To-Wallet

That’s all for the Mobikul Wallet System. If you have a query or suggestions please get back to us at webkul.uvdesk.com

Odoo Website Product A-Z List

$
0
0

Introduction

Odoo Website Product A-Z List- Product Listing is an important tool for the website so this module helps the user in product search with the listing based navigation. This module allows you to manage the listing of products alphabetically.  Product Listing helps in improving website SEO by providing internal linking options for the website.

Note: Module is dependent on Website Webkul Addons

Features

  • Improves User Navigation.
  • It helps in improving Website SEO.
  • Admin can Enable/Disable A-Z List.

Installation

After buying this product you will get a zip file, which contains module. Unzip the file and now just copy `products_az_list` module folder into your Odoo addons. Now enable developers mode on your Odoo

  • Go to settings menu and Click on Activate the developer mode.
  • Now Go to Apps menu and Click on ‘Update Modules List
  • Remove the Apps filter

Now you will be able to see the module, just install it. After installing you will be able to handle different functionality as mentioned in module’s Workflow.

Workflow

Once the Website Product A-Z List module is installed, under Webkul Website Addons click on “Website: product A-Z list” configuration link.

Now, on the pop-up window to manage the products listing on the website select the products which you do not want to keep in listing and click on Apply button.

To check the product list with applied settings click on the “Products  A-Z list” link.

The alphabetical product navigation makes search easier. 

Support

For any kind of technical assistance, just raise a ticket at https://webkul.uvdesk.com/ and for any doubt contact us at support@webkul.com

Protected: Odoo POS Customer Contact

$
0
0

This content is password protected. To view it please enter your password below:


Getting started with selenium

$
0
0

Selenium automates a web browser (headed or headless like phantomJs). It is used to automate only a web application, not any desktop program or application (it’s beyond the scope of it). It is a free (open source)automated testing suite for web applications across web browsers.It has four components.

  • Integrated Development Environment (IDE)
  • Remote Control (RC)
  • WebDriver
  • Grid

In this blog we will focus majorly on selenium WebDriver. Selenium-WebDriver was developed to support dynamic web pages where elements of a page changes without the page itself being reloaded. It makes direct calls to the browser using each browser’s native support for automation. Selenium supports languages like java, perl, php, C#, Ruby, JavaScript and Python.

Setting Up a Selenium-WebDriver

Install selenium basically means to set a project in development so we can write program using selenium. So here we will create a project in Java and write a simple program using WebDriver. Before going further, lets look at the pre-requirements:

  • JDK(1.7 or later)
    The JDK can be installed to your system from here. Java 1.8 is highly recommended for selenium 3.x and later updates.
  • Eclipse
    For installing Eclipse we can go through this page.
  • Selenium Java Client Driver
    The Selenium Java Client Driver can be downloaded from here. Make sure to choose the driver for Java, here we can get drivers for other languages too.

Configure Eclipse with WebDriver

The following are the steps to add a java project and to set/configure selenium to the added project:

  1. Open Eclipse and create a new project through File > New > Java Project, give the project name as convenient(say ‘gettingStarted’.
  2. Create a package under the project by, Right-click on created project > Selecting New > Package. Give the package name as per your need (say ‘pagkage1’).
  3. Under the package (‘pagkage1’) we need to create a new class, right-click on package and then select- New > Class. Let’s say the name of class is ‘Myfirstclass’.
    The project Structure should look like the second image below:
Now, Lets include the selenium WebDriver’s into the project(or java build path). Following are steps to set WebDriver to the project:
  1. Right-click on the created project (‘gettingStarted’) and select Properties.
  2. On the opened dialog box, click on “Java Build Path”.
  3. Now, go to the Libraries tab, and select “Add External JARs..”
  4. Navigate to the file which was download at the time of downloading “Selenium Java Client Driver”, and select all the jar files and, click OK.
And yes, we are finally done importing Selenium libraries into our project. Now if can go further and add some code in the classes to obtain our testing flow/requirements.

Prestashop One Page Checkout

$
0
0

Prestashop One Page Checkout –  One Page Checkout removes unnecessary steps and makes the checkout process much simpler. It provides a nice checkout experience for the customers and greatly increases your website sales.

The purpose of One Page Checkout is to gather the information that is needed, and complete the sale as quickly as possible. 

1 in 10 people who abandon their cart do so because the checkout process is too long Reduce cart abandonment by offering the entire purchase process on a single page, with Prestashop One Page Checkout.

Feature Highlights

There’s no question that single-page checkout is quicker than multi-page. With single-page, your shopper doesn’t have to wait for a next page to load.

The checkout process is undoubtedly faster because pages don’t have to be loaded for each step. Moreover, fields respond to the user’s input in real time (thanks to AJAX), making the process that much more efficient.

1. SPEED

A quick and painless checkout process means less time for the user to get distracted or change his mind.

2. INTERACTIVITY

Because AJAX responds in real-time, fields are more interactive. They respond to the user’s activities, creating a more interactive checkout experience.

3.  NAVIGATION

Single-page checkout simplifies navigation for the User as everything is organised at once place giving the user fewer reasons to hit the back button.

4. DESIGN

A complete New and fresh look and feel of the Checkout Page.

Module Features

MAIN CONFIGURATION :

  • Admin has an option to enable/disable the One Page Checkout option.
  • Admin also has option to decide  whether the module will run on Sandbox more or not.
  • Admin can enter the IP address which will be able to use the One Page checkout Option.

LOGIN/ REGISTRATION / CHECKOUT BUTTON SETTINGS : 

  • Admin can easily Customise the Checkout Button.
  • Admin can enable/disable One Page Checkout Option for Guests.
  • Admin can choose the default customer group of guests using One Page Checkout Option.
  • Allow Users to save their address during the process.
  • Immediate Check of data entered in the fields using “Inline Validation”. 
  • Decide whether Users need to enter Social Title and Date of Birth during One Page Checkout process.
  • Allow/Restricts users to opt for Offers and subscribe to Newsletters during One Page Checkout process.

ADDRESS / SHIPPING / PAYMENT SETTINGS : 

  • Admin can enable/disable Same address usage for Delivery and Invoicing purpose.
  • Admin can enable/disable display of Carrier Logo and Carrier Description.
  • Admin can allow login via Facebook or Google. 
  • Choose to Display/Hide Payment Gateway Logo.
  • Allows admin to decide the default payment method for One Page Checkout.

CART SETTINGS : 

  • Allow/Restrict Users to view cart details before checkout.
  • Allow Users to Save their Cart products for a Later purchase.
  • Customers will have a separate tab to view/add to cart and delete the products that are saved for later purchase during One page checkout.
  • Special Related “Who Bought this also Bought” products displayed to the customers during the checkout process.
  • Admin can specify the number of related products to be displayed.
  • Admin can select the default product image size to be displayed on One page checkout.
  • Admin can allow/restrict customers to choose a terms and conditions checkbox before proceeding.
  • Admin can link desired prestashop CMS Page to this terms and conditions link.

Installation

  1. Go to the back  office-> modules -> Upload a module
  2. Upload zip file of “One Page Checkout” module
  3. The module will automatically get installed on your Prestashop.


Module Installed Successfully !

Configuration

The Module Configuration has been divided into various sections keeping in mind the usability of the module.

1. General Settings

Here Admin has an option to enable/disable the One Page Checkout option.

Admin also has option to decide  whether the module will run on Sandbox more or not.

In case Sandbox mode is used, admin can enter the IP address which will be able to use the One Page checkout Option.

2. Customization

Here Admin has some additional option to match the checkout page with the theme of the site. Admin can choose the following options for the Checkout Button.

  • Checkout Button Color
  • Checkout Button Font size
  • Checkout Button Font Color
  • Checkout Button Font Family

 

3. Login and Register

Admin can decide whether One Page Checkout will be available for Guests.  Admin will also have an option to select the Customer Group for the User using One Page Checkout Functionality.

Admin can decide that the user using one page checkout as guest – will be grouped under which customer group.

Admin can allow/restrict customers from  Saving their addresses that has been entered on one page checkout.  Inline Validations for each field can also be activated. In this section Admin can allow users various additional features like –   Entering social title, date of birth, offers, newsletters etc. Basically we allow admin to customise the One Page Checkout Page.

 

4. Address

In this section, Admin can enable/disable same address usage for delivery and invoicing purpose. Module also allows admin to select which fields on address section will be mandatory to be filled in.

 

5. Shipping

In this section, Admin can decide whether to show Carrier description or Carrier logo on One Page checkout Page or not.

6. Payment

Now it is upto admin to decide which payment gateway will be used as default payment method for One Page checkout. Admin can also enable/disable display of Payment Gateway Logo.

7. Social Login

Here, Admin can allow users to login via some social media like – Facebook / Google. To enable login via each of them, admin needs to enter APP ID and SECRET KEY.

 

8. Cart

Admin can enable/disable the feature to display cart details before checkout process starts.  Here admin can allow a new functionality to the customers where they can save their cart products for later purchase.

An additional  striking feature of the module is that its displays already purchased products by other customers along with the products already existing in the cart.  Admin configures how many related products should be displayed.

Admin selects the default product image size on checkout page. Admin has an option to display to its customers a terms and conditions checkbox which they have to select while checking out. Admin can link desired prestashop CMS Page to this terms and conditions link.

 

This is an end to the Module Settings to be made by the Admin.

Frontend View

This is how the default One Page Checkout Page will look

Social Login feature on Frontend

If the User is not logged in  – They will have an option to login via social profiles also like  Facebook and Google.  This option will be available only when admin has entered valid social login details in the module configuration.
If allowed by admin, Users can have One page checkout functionality for Guest Users also.

Save Cart for Later Purchase Feature

If the user has logged in as a customer, they will have an option to save the product in the cart for later purchase.

 In the Customer “My Account” section, a new tab is added where saved for later products are listed.

 On “My Saved Cart” page will be listed all the products that customer has saved for later purchase from One page Checkout.

  • Customers can View the product from “My Saved Cart” page.
  • Customers can Add to Cart the product from here itself, whenever the purchase is needed.
  • Customers can delete the product from this list if the idea to buy that particular product is dropped.

Special Related Products listing below the Cart page

It is a human tendency to be influenced by what others have done. You can influence your customers to spend more on products from your store easily by displaying the related products (on the basis of what other have purchased along with the products they have added in the cart).

And when they are in the mood to buy, a glimpse of related popular products is all they need to shell out more money. 😉

Grab this module and unlock its various other features and functionalities.

This is how our Prestashop One Page Checkout Works  !

Thank you for reading this Blog 🙂

We hope this Addon will enhance the functionality of your prestashop store.

Support

For any kind of technical assistance, just raise a ticket at : http://webkul.uvdesk.com/ and for any doubt contact us at support@webkul.com

 

CS-Cart Social Messaging

$
0
0

CS-Cart Social Messaging:
With this CS-Cart Social Messaging add-on, you can add a widget to your store and your store visitors can send messages to your Facebook or Twitter account.

When visitors have a concern about the products, they are likely to either look for details to contact Site Owner for further description or look for another product. Rather than watching potential buyers click away from e-commerce sites and to limit the risk of losing prospective clients, we have created “CS-Cart Social Messaging”.

So, Your store visitors will be able to send direct messages to your Facebook or Twitter account via any desktop or any mobile device straight from your store. They can start a conversation which continues entirely through Facebook Messenger or Twitter messages.

Features & Benefits

  • Well integrated with CS-Cart Multi-Vendor.
  • Messaging option is available for Facebook and Twitter.
  • The user can communicate with admin via social chat medium and can ask their query to admin.
  • Increases customer engagement which improves site traffic.
  • Helps in building trust between brands and customers.
  • Easily configurable – Just fill the credentials and it is ready to use.
  • A user can send message easily. Only needs to login into their Twitter/Facebook account.
  • It comes with a Like/Follow button so users can become followers of your Facebook or Twitter page.
  • Easy to manage at admin end.

How To Upload and Install

After downloading CS-Cart Social Messaging, you will get a zip file and install.txt . Read the install.txt carefully and configure it accordingly.

Go to “Manage add-ons”, click on “+” to upload and install the zip file as shown below.
Upload
Click on “Local” to browse the zip file and then click on “Upload & Install” as shown below in snapshot.
CS-Cart Social Messaging

Configuration

After installing CS-Cart Social Messaging, Click on Settings as shown below :

settings

To allow Twitter messaging, fill the Twitter credentials which include Consumer Key, Consumer Secret Key, Access Token, Access Token Secret.

Now the question is from where we can get these twitter credentials??

So, to get these above-listed credentials you need to create a Twitter app on https://app.twitter.com Callback URL listed in the settings will be used while creating a twitter app. To know how to create an app, continue reading this doc.

twitter settings

Next settings tab is for Facebook. To allow Facebook messaging, an admin needs to enter the Facebook page URL associated with the facebook account.

There is also an option to Hide Cover Pic of the Facebook page at store frontend. Also to display smaller header (Which includes Display Pic and Cover pic) of the page, there is a checkbox provided. Please refer the below screenshot and save the settings as per your needs.

facebook settingsTwitter details will be visible in the Twitter Settings after saving the credentials as per the below snapshot.

settings saved

 

How To Create Twitter App

Go to https://app.twitter.com . Log in with your Twitter account credentials & click to Create New App as shown below in the snapshot.

twitter app

Enter all the mandatory Application Details to add an App. These details include Name & Description of the app, Website URL, Callback URL (For Callback URL you can refer to the Addon Settings at CS-Cart Backend Panel.)

Accept the Terms & condition of developer and Create Your Twitter Application.

create app

On adding an application, Click on the app name as shown below.

app created

Under the Settings Tab, Make sure that you have allowed this application to be used to Sign in with Twitter.

app settings

Under the tab  Keys and Access Token, You can get the Twitter App Credentials for addon settings. At first, you need to generate these by clicking on the respective button for Key/Token generation. You can regenerate these keys & token. Please refer the screenshot below.

Now go to Permissions tab and select Read, Write and Access direct messages permission.

 That’s all for a new Twitter app generation. If still have any doubt, feel free to write at support@webkul.com.

 

Front End View

On your site, a widget for messaging will be visible after setting the addon properly in your store.

Messaging Widget

On clicking the icon, a message box will be opened. If the visitor is logged in to Twitter/Facebook in the same browser then the message box will appear otherwise there will be an option to log in to the respective account.

A user can just type down the message and send as shown below.

twitter message

This message can be seen in the Twitter messages and then User and Admin can communicate further accordingly.

Twitter

On clicking the Facebook tab, the user will get a message box for sending a message on Facebook.

fb message

This sent message can be seen in the Facebook messenger and then User and Admin can communicate further accordingly.

facebook

Support

This is all about CS-Cart Social Messaging add-on. Still, have any issue, feel free to contact us at http://webkul.uvdesk.com and let us know your views to make the addon better.

Installing node using nvm

$
0
0

You can install node through multiple way . But the simplest way to install node is using NODE VERSION MANAGER(NVM) through which you can easily install node and also its easy to manage node version . you can install node in few step

  1. run this command
    curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash
  2. change source for installing file by this command
    source ~/.bashrc
  3. now check the version of NVM installed by
    nvm --version
  4. for checking latest available version of node you can run this command in terminal
    nvm ls-remote
  5. 
    

    All version is listed down in your terminal now you can install any of the version available you can use this command

    nvm install v6.11.0

    where v6.11.0 is the version of node you can change it accordingly. you can install more than one node version.

  6. Node with v6.11.0 is installed you need to use them by command
    nvm use v6.11.0

    you got the message “Now using node v6.11.0 (npm v3.10.10)”

Hope its worked for you. from onward you can easily install any available version of node and upgrade node version easily in your development server

 

Protected: Odoo POS Items Count

$
0
0

This content is password protected. To view it please enter your password below:

Odoo Custom Product Tabs

$
0
0

introduction

Odoo Custom Product Tabs: Using this module admin can classify the product related information in tabs on the product page. Tabs based information is very useful for large page content. It helps in making the information more lucrative and classified. Admin can create tabs as per product properties like Item Details, Payment Options, Shipping Policy, Product Specifications, etc.

Features

  • Add product information from Backend.
  • Describes your Product using text, videos, images or tables.
  • Vertical and Horizontal Tabs Options.
  • Full Customizable Content.
  • You can modify the order of the product tabs.

Installation

After buying this product you will get a zip file, which contains module. Unzip the file and now just copy `custom_product_tabs` module folder into your Odoo addons. Now enable developers mode on your Odoo

  • Go to settings menu and Click on Activate the developer mode.
  • Now Go to Apps menu and Click on ‘Update Modules List
  • Remove the Apps filter

Now you will be able to see the module, just install it. After installing you will be able to handle different functionality as mentioned in module’s Workflow.

Workflow

Once Custom Product Tabs module is installed, click on Sales menu> under configuration click on product tabs> All tabs and create desired tabs by clicking on Create button.

The list of created tabs with their corresponding sequence.

The Custom Product Tabs can be aligned either horizontally or vertically.

The tabs can also be created from the product page.

List view of tabs with their respective sequence on the product page.

Horizontal View of tabs

Vertical View of tabs

Support

For any kind of technical assistance, just raise a ticket at https://webkul.uvdesk.com/ and for any doubt contact us at support@webkul.com

Joomla – How to use a model in another component

$
0
0

Introduction

In this blog we will learn about using a Joomla model outside the scope of a component. As you must be already knowing about JModelLegacy Class of Joomla which provides methods to get Model, but it has some limits as you cannot access all models using this JModelLegacy::getInstance( ).

Solution – Admin

To get all models of any component you have to create your own function, it is recommended to create a static helper function, as you may need to use the function at several places.

/**
 * Webkul Software.
 *
 * @category  Webkul
 * @author    Webkul
 * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 *
 * getModelAdmin function
 *
 * @param [String] $component name of component
 * @param string $name name of model
 * @param string $prefix
 * @return Object
 */
function getModelAdmin($component, $name = 'Custom', $prefix = 'CustomModel')
{
    if (!isset($component)) {
        JFactory::getApplication()->enqueueMessage(JText::_("COM_ERROR_MSG"), 'error');
        return false;
    }
    $path=JPATH_ADMINISTRATOR . '/components/'.$component.'/models';
    JModelLegacy::addIncludePath($path);
    require_once $path.strtolower($name).'.php';
    $model = JModelLegacy::getInstance($name, $prefix);
    // If the model is not loaded then $model will get false
    if ($model == false) {
        $class=$prefix.$name;
        // initilize the model
        new $class();
        $model = JModelLegacy::getInstance($name, $prefix);
    }
    return $model;
}

For Site

A similar function for accessing site models:

/**
 * Webkul Software.
 *
 * @category  Webkul
 * @author    Webkul
 * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 *
 *
 * getModelSite function
 *
 * @param [String] $component name of component
 * @param string $name name of model
 * @param string $prefix
 * @return Object
 */
function getModelSite($component, $name = 'Custom', $prefix = 'CustomModel')
{
    if (!isset($component)) {
        JFactory::getApplication()->enqueueMessage(JText::_("COM_ERROR_MSG"), 'error');
        return false;
    }
    $path=JPATH_SITE . '/components/'.$component.'/models';
    JModelLegacy::addIncludePath($path);
    require_once $path.strtolower($name).'.php';
    $model = JModelLegacy::getInstance($name, $prefix);
    // If the model is not loaded then $model will get false
    if ($model == false) {
        $class=$prefix.$name;
        // initilize the model
        new $class();
        $model = JModelLegacy::getInstance($name, $prefix);
    }
    return $model;
}

If you find this blog useful please like and share.


How to fire Lightning Event from Visualforce Page

$
0
0

In this blog, we will learn how to fire lightning event from visualforce page. We will be using apex:includeLightning and aura:dependency tags. Let us know about these tags in brief.

Tag Reference

A brief information about tags.

1) apex:includeLightning : It includes lightning components for Visualforce JavaScript library, lightning.out.js, according to the domain mapping.

Attributes-
–> id – An identifier to the element.
–> rendered – Specifies if the element will be rendered or not. The default value is true.

2) aura:dependency – This tag is used for declaring dependencies.

Attributes-
–> resource – The resource on which the dependency is being declared.
–> type – The type of resource that component depends on. The default value is “COMPONENT”.

Fire lightning Events in Visualforce Page

Now, let’s start with the code. We have to fire an Event, so, first and foremost we will require an event. So, we will write a simple code for event containing single parameter, and event type should be “APPLICATION”:

<aura:event type="APPLICATION">
    
    <!-- 
        /**
         * Webkul Software.
         *
         * @category  Webkul
         * @author    Webkul
         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
         * @license   https://store.webkul.com/license.html
         */
     -->
    
	<aura:attribute type="string" name="data" />
</aura:event>

Now, let’s start with the app:

<aura:application access="GLOBAL" extends="ltng:outApp">
	
    <!-- 
        /**
         * Webkul Software.
         *
         * @category  Webkul
         * @author    Webkul
         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
         * @license   https://store.webkul.com/license.html
         */
     -->
    
	<!--Access of the app should be "global"-->
	<!--The app should extend from ltng:outApp or ltng:outAppUnstyled-->
	<!--The dependency component can be called from Visualforce page, using this app.-->
	<aura:dependency resource="c:myDemoComponent" />
</aura:application>

We have to create a myDemoComponent which we have the dependency on, so here is the code:

<!--COMPONENT-->
<aura:component >
    
    <!-- 
        /**
         * Webkul Software.
         *
         * @category  Webkul
         * @author    Webkul
         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
         * @license   https://store.webkul.com/license.html
         */
     -->
    
    <br/><br/>
    <aura:attribute name="str" type="String" default="Hello World Ligtning!!!"/>
  	<div>{!v.str}</div>
    <br/><br/>
	<aura:registerEvent name="myevent" type="c:myEvent" />
	<ui:button label="fireEvent" press="{!c.fireevent}" />
</aura:component>


<!--Controller-->
({
    /**
     * Webkul Software.
     *
     * @category  Webkul
     * @author    Webkul
     * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
     * @license   https://store.webkul.com/license.html
     */
    fireevent: function(component, event, helper) {
        var myEvent = $A.get("e.c:myEvent");
        myEvent.setParams({"data":"Test"});
        myEvent.fire();
    }
})

Now let’s call the use the App in Visualforce Page:

<apex:page showHeader="false" sidebar="false">    
    <!-- 
        /**
         * Webkul Software.
         *
         * @category  Webkul
         * @author    Webkul
         * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
         * @license   https://store.webkul.com/license.html
         */
     -->
     
     
    <apex:includeLightning />
    
    <!--DOM element in which lightning will be rendered-->    
    <div id="lightning"> Hello world VF ..!!! </div>
    <script>
        //lightning out function
        $Lightning.use("c:myEventApp", function() {
            $Lightning.createComponent("c:myDemoComponent", {}, "lightning", function(){
                $A.eventService.addHandler({ "event": "c:myEvent", "handler" : visualForceFunction});
            });
        }); 

    </script>

    <script>
    //handler called in lightning out function
    var visualForceFunction = function(event){
        var myEventData = event.getParam("data");
        alert(myEventData);
    };

    </script>
</apex:page>

Output

Support

That’s all for Remote Action function in Visualforce Page, still have any issue feel free to add a ticket and let us know your views to make the code better https://webkul.uvdesk.com/en/customer/create-ticket/

 

How To Call Model Popup In Magento 2

$
0
0

How To Call Model Popup In Magento 2- Here I am going to explain you how you can call model popup in magento2.

First of all create your popup form data in your phtml file.

<div id="custom-model-popup">
	<dl>
		<dt>Definition list</dt>
		<dd>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
		aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
		commodo consequat.</dd>
		<dt>Lorem ipsum dolor sit amet</dt>
		<dd>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
		aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
		commodo consequat.</dd>
	</dl>
	<form action="/my-handling-form-page" method="post">
		<div>
			<label for="name">Name:</label>
			<input type="text" id="name" name="user_name">
		</div>
		<div>
			<label for="mail">E-mail:</label>
			<input type="email" id="mail" name="user_mail">
		</div>
		<div>
			<label for="msg">Message:</label>
			<textarea id="msg" name="user_message"></textarea>
		</div>
	</form>
</div>

Now include javascript code.

<script>
	require([
		"jquery",
		"Magento_Ui/js/modal/modal"
	], function($, modal){
		var options = {
			type: 'popup',
			responsive: true,
			innerScroll: true,
			title: "Model Popup Heading...", //write your popup title 
			buttons: [{
				text: $.mage.__('Submit'),
				class: 'button',
				click: function () {
					console.log('Do something here......');
					// Do something here........
				}
			}]
		};
		var popupdata = $('<div />').append($('#custom-model-popup'));
		modal(options, popupdata);
		popupdata.modal('openModal');
	});
</script>

So the output of this snippet will be same as below screenshot.

In this way you can call model popup and if you have any query then comment below.

Converting Visualforce Page Look In Lightning Look

$
0
0

In this blog we will learn how to give lightning look to visualforce page. To convert your page in lightning view, now you don’t have to create lightning component separately you just need to change css. Let’s learn how:

Key Points:

1). <apex:Slds/> : By using this tag you can include lightning css file in your visualforce page. You don’t need to update your resource time to time .

2). To use the SVG spritemap icons, add the attributes xmlns=“http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink” to the <html> element. As shown below:

<apex:page>
  <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
    <!-- write your code -->
     <span class="slds-icon_container slds-icon-standard-account">
        <svg aria-hidden="true" class="slds-icon">
            <use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/standard-sprite/svg/symbols.svg#account')}"></use>
        </svg>
       <span class="slds-assistive-text">Contact Icon</span>
     </span>
  </html>
</apex:page>

3). Wrap your code in a container:

<div class="slds-scope">...</div>

Example:

Let’s create an example page and give this page a lightning look in salesforce lightning user interface and classic look in salesforce classic user interface.

1) . Create a visualforce page and copy the following code:

<apex:page standardController="Contact" recordSetvar="Cont" sidebar="false" extensions ="exampleLightningVf" tabStyle="Contact">
    <!-- 
    /**
    * Webkul Software.
    *
    * @category  Webkul
    * @author    Webkul
    * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
    * @license   https://store.webkul.com/license.html
    */
    -->
    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
        <head>
            <style>
                .head{
                font-size:1.3em;
                }
                .slds-scope .slds-icon-standard-account {
                background-color: #7f8de1;
                width: 35px;
                height: 33px;
                margin-right: 10px;
                margin-top: 3px;
                }
                .wk_btn{
                margin: 10px 45% !important;
                }
                
            </style>
        </head>
        <apex:Slds rendered ='{!ligtningMode}'/> 
        <div class = "slds-scope">
            <apex:form >
                <apex:outputpanel styleclass="slds-grid" >
                    <apex:outputpanel styleclass="slds-col slds-p-horizontal_small slds-size_1-of-2 slds-medium-size_5-of-6 slds-large-size_8-of-12" rendered ='{!ligtningMode}'>
                        <div class="slds-page-header" role="banner">
                            <div class="slds-grid">
                                <span class="slds-icon_container slds-icon-standard-account">
                                    <svg aria-hidden="true" class="slds-icon">
                                        <use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/standard-sprite/svg/symbols.svg#account')}"></use>
                                    </svg>
                                    <span class="slds-assistive-text">Contact Icon</span>
                                </span>
                                <div class="slds-col">
                                    <h1 class="slds-text-heading--medium">Contact </h1>
                                    <p class="slds-text-heading--label">Home</p>
                                </div>
                            </div> 
                        </div>
                    </apex:outputpanel>
                </apex:outputpanel>
                
                <apex:sectionHeader title="Contacts" subtitle="Home" help="https://help.salesforce.com/articleView?err=1&id=contacts_overview.htm&siteLang=en_US&type=0" rendered="{!!ligtningMode}"  /> 
                <apex:pageBlock mode="{!pbMode}">
                    <apex:commandButton value="New" action="/001/e" styleClass="slds-button slds-button_neutral wk_btn"/>
                    <apex:pageBlockTable value="{!cont}" var="item"  id="list" styleClass="slds-table slds-table--bordered slds-table--striped slds-table--cell-buffer slds-table--fixed-layout wk_table">
                        <apex:column headerValue="Name" headerClass="slds-text-heading--label " styleClass="slds-truncate wk_table">
                            <apex:outputLink value="/{!item.id}">
                                <apex:outputText >{!item.name}</apex:outputText>
                            </apex:outputLink>
                        </apex:column>
                        <apex:column headerValue="Account Name" headerClass="slds-text-heading--label" styleClass="slds-truncate wk_table">
                            <apex:outputLink value="/{!item.accountid}">
                                <apex:outputtext value="{!item.Account.name}"/>
                            </apex:outputlink>
                        </apex:column>
                        
                        <apex:column headerValue="Phone" headerClass="slds-text-heading--label" styleClass="slds-truncate wk_table">
                            <apex:outputtext value="{!item.phone}"/>
                        </apex:column>
                        
                    </apex:pageBlockTable>    
                    
                    
                </apex:pageBlock>
                
                
            </apex:form>
        </div>
    </html>
</apex:page>

2). Now create controller class to determine the look of visualforce page according to user interface either lightning or classic.

public class exampleLightningVf {
   /**
    * Webkul Software.
    *
    * @category  Webkul
    * @author    Webkul
    * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
    * @license   https://store.webkul.com/license.html
    */
    public String pbMode{get; set;}
    public Boolean ligtningMode {get; set;}
    
    public exampleLightningVf(ApexPages.StandardSetController controller) {
     if(UserInfo.getUiThemeDisplayed() == 'Theme3' && Apexpages.currentPage().getParameters().get('beLightning') == null)
     {
         pbMode = 'edit';
         ligtningMode = false;
     }
        else {
            pbMode = 'maindetail';
            ligtningMode = true;
        }
            
    }
}

3). Last step : Now create a new visualforce page tab and assign your visualforce page to this tab.To create visualforce page tab Goto|SetUp|Tabs|Lightning Page Tabs| New | Assign your Lightning Page.

That’s all now check your page in both user interface.

Output

#Lightning View:

# Classic View :

Support

That’s all for Converting Visualforce Page Look In Lightning Look , still if you have any further query feel free to add a ticket, we will be happy to help you https://webkul.uvdesk.com/en/customer/create-ticket/.

 

Opencart Marketplace Compatibility with RTL Arabic Language

$
0
0

Opencart Marketplace Multivendor Module is a multilingual module. This module will support all the languages. If you want to change the default language into any another language, you can check this link language translation.

In this blog, we are showing you that how this module looks in the Arabic language.

Seller/Customer Signup

After installation of the marketplace and set up the store language as Arabic, the signup page will look as below. On the signup page, the customer can choose the Yes option to become a seller. After filling up the sign-up form, the admin will approve the seller from their admin backend.

arabic seller registration

Notification Pop Up at Login:

When the seller will log in to their account, a pop-up will appear on the screen. The popup will display the low stock products and the most viewed products. In the low stock section, the seller can see the product with the product name, model, and quantity. In most viewed section, it will show the product name, model, and the number of views for the products.

login page

Seller Panel View:
The marketplace menu will appear in the seller panel after the approval of the admin. In the marketplace block section, the seller can see the following menu options.

  • My Profile
  • Dashboard
  • Order History
  • Transactions
  • Product List
  • Add Product
  • Download
  • Manage Shipping
  • Ask to Admin
  • Notification

seller profile page

My Profile

Under my profile tab, the seller can see the account information in terms of profile and payment details. Here the seller can save the information related to the payment types like PayPal first name, last name, and id. The seller can change their profile image and contents of their shop.

edit profile

Dashboard

Seller dashboard will show the complete overview of the seller profile. The seller can check sales analytics, latest orders, total orders, total sales, total buyers, and low stock products. A graph will appeara at the seller end for specifying customers and their orders.

seller dashboard

Order History

In this part of the module, the seller can view the order history. The seller can filter the orders according to their needs. After clicking on view button, the seller can view and edit an order. The seller can fill the tracking details and can change the status for the order.

order history

Transactions

Under transaction tab, the seller can see their transaction with the admin for the orders. When admin release payment from their panel, then the payment will reflect in this tab.

transaction

Product List

Product added by sellers will show in this tab. The seller can view or edit the product from this section. The seller can also apply the filter to the products for a better view.

product list

Edit Product:
The seller can change all the details of the product like category, product name, price and all other information.

edit product

Add Product

In this feature, the seller can add new products for the catalog. The seller can add new product only when it is enable by admin.

add product arabic

Downloads

The seller can also add downloadable items in this field. They need to upload downloadable file and mention name of that file.

downloads

Manage Shipping

In the marketplace, the seller can manage the shipping also. The customer can define the shipping charges in terms of zip code, weight, and country.

manage shipping arabic

Ask to Admin

If a seller wants to send a message to the admin or ask any query. Then the seller can communicate with the admin. The seller needs to fill the subject and the query here.

ask to admin

Notifications

The seller will get notified for their orders, products, and reviews. A popup will appear when the seller gets notified. The seller can see the notification link top of the page.

notification button arabic

Detailed Notification:

After clicking on view all notification the seller can view the detailed notifications. The seller can also view the notification link in the seller account section.

notification in arabic

Marketplace Page

The customer can see the link of “sell” at the top and the bottom of the page. After clicking on this link, the customer can see the marketplace landing page. Under this page, they can see the products and sellers of the marketplace. The admin can set the contents of this sell page.

sell page

Seller View

The customer can view the products of a particular seller, the display image of the seller, information of the seller like contact information, reviews. The customer can ask query to the seller. The admin can disable these features from their panel.

Seller Profile:

The customer can view the profile of the seller. Seller’s short profile text will show in this section. about seller

Store View:

The customer can see the company description of the seller.

Seller Collection:

All the products of the seller will show in this tab. The customer can sort the products according to the need. The buyer can view product list in grid view and list view.

seller product

Seller Reviews:

This tab will show the reviews given to the seller. The buyer can see the ratings of the seller here.

seller reviews

 

Seller Product Reviews:

In this section, the customer can view the reviews of the seller’s product.

product reviews

Seller Location:

Location added by the seller in their panel will show here. The customer can view the location of the with google map.

seller location

Product View

At product page, the customer can view the seller of a particular product. The customer can see the ratings and reviews and total added products of the seller.

seller at front arabic

For any query or doubt please add a ticket at http://webkul.uvdesk.com/

 

How to get product’s custom attribute and their options in magento2

$
0
0

How to get product’s custom attribute and their options in magento2

Today I am going to explain that how you can get product’s custom attributes in magento 2 in this article. Suppose you want to show a product creation form on frontend with some custom attributes and you do not know which attributes are assigned to which attribute set , so this blog will be very helpful for you :

Let’s create a function in helper, from which we are getting attributes according to attribute set ID :

 

<?php
namespace Company\Module\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    private $attributeManagement;

    /**
     * @param \Magento\Framework\App\Helper\Context        $context
     */
    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Eav\Model\AttributeManagement $attributeManagement
    ) {
        parent::__construct($context);
        $this->attributeManagement = $attributeManagement;
    }

    public function getCustomAttributes($attributeSetId)
    {
        try{
            $groups = $this->attributeManagement->getAttributes(
               \Magento\Catalog\Model\Product::ENTITY, // entity type
               $attributeSetId // this will contain your attribute set ID
            );
            foreach ($groups as $node) {
                return $node->getData(); // in this you will get particular attribute data
            }
        }catch(\Exception $e){
            return false;
        }
    }
}

 

When you call above function getCustomAttributes($attributeSetId), you will get all attributes for an attribute set Id.

Now, suppose you want to get a dropdown type of attribute’s options. So here is the code to get all options of an attribute of type Dropdown :

 

<?php
namespace Company\Module\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    private $productAttributeRepository;

    /**
     * @param \Magento\Framework\App\Helper\Context        $context
     */
    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Catalog\Model\Product\Attribute\Repository $productAttributeRepository
    ) {
        parent::__construct($context);
        $this->productAttributeRepository = $productAttributeRepository;
    }

    public function getCatalogResourceEavAttribute($attrCode)
    {
        // $attrCode will be attribute code, i.e. 'manufacturer'
        try{
            return $this->productAttributeRepository->get($attrCode)->getOptions();
        }catch(\Exception $e){
            return false;
        }
    }
}

 

When you call above function  getCatalogResourceEavAttribute($attrCode), you will get an array of options, if any.

Hope this blog will help you to develop custom functionality in your module in a better way. Try this and if you have any query then just comment below 🙂

Viewing all 5488 articles
Browse latest View live