Introduction

Online purchasing of goods play a significant role in the last two decades and more than 1.6 billion people all over the world are considering this method to purchase goods online, amounting to 1.90 trillion US dollars in 2016. It is expected to increase online consumers more than 2 billion in 2019 and retail sales increased by more than 100% than 2016 at the end of 2020 (Statistia, 2017). Online buying is growing due to the expansion of internet technology some 20 years ago and online shopping is increasing in terms of security, the range of services, popularity, and efficiency (Laohapensang, 2009). The internet is a useful tool used in marketing to provide a platform for both international and national transactions (Lim, Osman, Salahuddin, Romle, & Abdullah, 2016). Moreover, in daily life, online shopping plays a significant role and online consumers can access as well as compare product quickly, easily with one click of a mouse (Arora & Aggarwal, 2018; Jiang, Yang, & Jun, 2013). Despite this, online shopping in the entire world covers only 18% of total shopping and the remaining 82% comes in the head of traditional shopping, and expected to reach 51.5% in 2019 of the whole population of the world (eMarketer, 2014). According to Kearney (2015), global retail e-commerce sales reached US $840 billion in 2014 and estimated to enhance this sale to US $1506 billion at the end of 2018. The continual enhancement in retail online shopping sales shows that online shopping has massive market potential. Internet penetration rate in developing countries is lesser as compared to developed countries (Poushter, Bishop, & Chwe, 2018). Regardless of the prosperity in the field of online shopping worldwide, Pakistan was ranked as the second lowest adopter of online shopping and followed by the Philippines (Nielsen, 2010). In 2018, the total population of Pakistan is 200.8 million and 162 million people are non-internet users that is divided into two parts such as rural that consists of 68% and 32% belongs to urban (Sprague et al., 2014). There are several reasons why 81% of Pakistan’s population is non-internet user such as low literacy rate, e.g., 55% only and infrastructure issues (Sprague et al., 2014). Hence, in Pakistan, 97% of the people purchase traditionally and only 3% purchase thorough online (Rehman, 2018). Online shopping is growing rapidly in Pakistan (PRNewswire, 2016). In addition, literature concludes that less attention has been paid on online shopping behavior in context of Pakistan (Adnan, 2014; Ahmed, Su, Rafique, Khan, & Jamil, 2017; Ratilla, 2016). Therefore, there is need to study online shopping behavior in the future (Bhatti, Saad, & Gbadebo, 2018; Chawla, Khan, & Pandey, 2015; Kumar & Dange, 2012).

There are various factors that determine consumer purchase intention and after that consumer purchase intention has an influence on the shopping behavior of consumers. Subjective norms and perceived usefulness has much attention in enhancing purchase intention but these two factors have no direct influence on online shopping behavior (Lim et al., 2016). Moreover, perceived usefulness is an important factor that determines intention and cannot be ignored while shopping online (Gao & Bai, 2014; Lim et al., 2016). In addition, perceived ease of use and perceived usefulness that are the significant predictors of technology acceptance model (TAM) (Davis, Bagozzi, & Warshaw, 1989) play a significant role in enhancing intention and paying attention to these variables while purchasing goods online (Akhlaq & Ahmed, 2015; Cho & Sagynov, 2015). Yean, Johari, and Sukery (2015) validated subjective norms, attitude, and perceived behavioral controls as factors influencing intention to return to work and findings elucidated that perceived behavioral controls has no impact on intention while subjective norms and attitude are considered important in creating intention. Kashif, Zarkada, and Ramayah (2018) consider attitude, subjective norms (injunctive, descriptive, and moral), perceived behavioral controls, and behavioral intention. Meanwhile, perceived usefulness, subjective norms, and attitude must be considered while shopping online because these factors have a significant influence on purchase intention (Singh & Srivastava, 2018). Above-mentioned studies show that perceived usefulness, perceived ease of use, subjective norms, attitude, and PBC has inconclusive results. Hence, there is a need to study further these factors with purchase intention.

Literature reveals that consumer intention is not a single predictor that fully explains consumer behavior and suggests that use some other constructs between intentions to behavior to strengthen this relationship (Armitage & Conner, 2001; Hagger, Chatzisarantis, & Biddle, 2002). Harris and Hagger (2007) stated that there might be a person that has high intention to purchase something by using internet but he/she fails to perform transaction. Moreover, a meta-analysis on theory of planned behavior (TPB) was conducted by McEachan, Conner, Taylor and Lawton (2011). Mata-analysis reveals that correlation between intention and behavior usually quite substantial can change significantly. Moreover, this meta-analysis concludes that there is a need to use a moderating variable between intention and behavior because with the passage of time, intervening constructs increases that can alter the people’s behavior, change attitude, perception of control or subjective norms, and normative or control beliefs. Hence, generate the revised intentions. This type of change will tend to decrease the predictive validity of intentions that were evaluated before that alteration. This study attempts to used trust and commitment as a moderating variable between consumer purchase intention and online shopping behavior because these moderator can change the relationship between intentions to behavior. As in Pakistan, consumers have a lack of trust in online shopping and purchase conventionally. The result of this is that only 3% of people in Pakistan purchase online and the remaining 97% purchase traditionally. Moreover, the more committed person that has intention can perform an actual transaction. Thus, to achieve the major research objectives of current research, below sub-objectives are given:

  1. 1.

    To determine the influence of TAM (perceived usefulness and perceived ease of use) determinants on consumer purchase intention.

  2. 2.

    To determine the influence of TPB (subjective norms, attitude, and perceived behavioral control) determinants on consumer purchase intention

  3. 3.

    To determine the mediating effect of consumer purchase intention in online shopping behavior.

  4. 4.

    To determine the moderating role of trust and commitment between consumer purchase intention and online shopping behavior.

Hence, this study contributed to the body of knowledge by combining two theories TAM and TPB and examines their effect on consumer purchase intention. Furthermore, two moderators were (trust, commitment) introduced in this study (Fig. 1).

Fig. 1
figure 1

Theoretical framework

Literature review

Technology acceptance model

Davis (1989) developed TAM on the basis of the theory of reasoned action (TRA) that was presented (Fishbein & Ajzen, 1975). TRA proposed that attitude is influenced due to beliefs of a person, and TAM assumes that there are two types of beliefs such as perceived ease of use and perceived usefulness which are vital indicators that have an impact on the adoption of information technology (Davis, 1989). According to Lee, Kozar, and Larsen (2003), TAM considered the significant and commonly used theory to explain an individual acceptance regarding technology because it recommends only two factors such as perceived ease of use and perceived usefulness that mutually have an influence on intention. Taylor and Todd (1995) demonstrated that TAM can be useful in predicting the behavior of experienced as well as inexperienced consumers, with dissimilar emphasis on the determinants of purchase intention. Furthermore, there are some longitudinal studies conducted in the light of TAM and findings revealed that perceived ease of use and perceived usefulness considered important factors in determining behavioral intention (Venkatesh & Davis, 2000; Venkatesh & Morris, 2000).

Perceived usefulness

Perceived usefulness refers to the level to which a person believes that a specific technology that he/she is using increase his/her task performance (Davis, 1989; Liao, To, & Liu, 2013). Moreover, it means the degree to which online users feel that particular website could enhance efficacy and value to them at the time of purchasing goods online (Hu et al., 2009; Lai & Wang, 2012). Perceived usefulness of the retailer’s website normally depends on the effectiveness of technological features like services provided by an online retailer to consumers and advance technology in finding goods (Kim & Song, 2010). As we know in developing countries, internet technology is less as compared to developed countries that is why many prior studies regarding perceived usefulness done in developing countries like Malaysia (Eri, Islam, & Daud, 2011; Letchumanan & Muniandy, 2013), Vietnam (Nguyen & Barrett, 2006), China (He, Lu, & Zhou, 2008; Lai & Wang, 2012; Zhao & Cao, 2012), Iran (Aghdaie, Piraman, & Fathi, 2011) while less studies conducted in developed countries such as Spain (Hernández, Jiménez, & José Martín, 2011; Martí Parreño, Sanz-Blas, Ruiz-Mafé, & Aldás-Manzano, 2013), South Korea (Wook Seo, Chang Lee, & Sung Lee, 2013), Taiwan (Liao et al., 2013). The reason behind more studies in developing countries is that information technology is at an infant phase in developing countries as compared to those countries that are not developing (Hana, Mike, & Parvaneh, 2012). The consumer thinks to purchase goods online due to perceived usefulness because consumers want to save their time during shopping (Guritno & Siringoringo, 2013). In this study, perceived usefulness used in terms of general perception of consumer regarding internet technology that increases the intention of consumers to purchase something by using internet. The following are the proposed hypotheses of this study;

  • H1: Perceived usefulness has a significant and positive influence on consumer purchase intention (CPI)

  • H1a: CPI significantly and positively mediates the relationship between perceived usefulness and online shopping behavior (OSB)

Perceived ease of use

Perceived ease of use is an indicator that is used in TAM and it refers to an individual opinion that new technology will be used without effort (Davis, 1989, 1993). Perceived ease of use means the level to which a person believes that a specific information system that he/she use free of effort (Davis, 1989). Similarly, perceived ease of use means a degree to which a consumer finds that activity has less effort and effort considers a finite resource that attached with various activities from his/her side (Radner & Rothschild, 1975). According to Chiu, Lin, and Tang (2005), perceived ease of use refers to the degree to which consumers believe that websites that are used for purchasing goods help in finding lots of information with little consumer effort. Consumers like and visit only those websites for purchasing goods that have a simple and accessible user interface (Chiu et al., 2005) because it leads to satisfaction from customer side that enhances online shopping intention (Lee & Lin, 2005). Moreover, there is a need to deliver comfort, efficiency, and convenience from online retailer side for their customers in term of perceived ease of use that can establish a comparative advantage for their website (Cha, 2011). In perceived ease of use, consumers always search easier process to buy goods online such as specific product available easily, easy access websites, compare products and their prices, understand online buying easily then they have the intention to buy online (Broekhuizen & Huizingh, 2006; Pavlou, 2003). In this study, perceived ease of use employ in terms of easier process in searching goods. Perceived ease of use is playing a significant influence in determining intention (Davis, 1989; Gao & Bai, 2014). By acknowledging the above-mentioned studies, we propose the following hypotheses for the current study:

  • H2: Perceived ease of use has a significant and positive influence on CPI

  • H2a: CPI significantly and positively mediates the relationship between perceived ease of use and OSB

Theory of planned behavior

Ajzen (1991) extend TRA theory that developed (Fishbein & Ajzen, 1975) because TRA theory has some limitations in dealing voluntary behavior of consumers while theory of planned behavior (TPB) proposed that consumer behavior is not fully under control hence a voluntary action. TRA hypothesize that individual positive attitude jointly with the thought of the individual formed the behavioral intention of that individual (Fishbein & Ajzen, 1975). While, TPB theory present a better explanation regarding behavioral model as compared to TRA that an individual is supposed to execute definite behavior only if that individual has their actual control over his/her behavior (Ajzen, 1991). Therefore, a person has positive subjective norms, attitude, and perceived behavioral control and intention that a specific person will execute actual behavior (Ajzen, 1991). Both TRA and TPB theories predict the behavior of consumers and TPB considers the best theory that predicts the behavior of consumers (Taylor & Todd, 1995), and this theory is used extensively in predicting behavior (Knowles, Hyde, & White, 2012). One of the prior researchers suggested that TPB theory is good as compared to TRA in predicting the behavior of individuals, particularly ethical intentions (Chang, 1998).

Attitude

The attitude of a person/individual is a significant factor in his/her perception and has an influence on behavioral intention. Therefore, it plays an important part in creating an intention to perform a particular behavior. Attitude means an individual’s opinion of outcomes regarding a specific behavior and attitude also depends on the past experience of that individual. According to Ajzen (1991), attitude means the overall judgment as well as an assessment of behavior from the individual side. Attitude is a significant factor of the voluntary behavior of individuals that at first propose in TRA (Fishbein & Ajzen, 1975) and after that (Ajzen, 1991) extend TRA and make TPB theory. In these two behavior theories, the term attitude refers to the outcome that is influenced by certain beliefs held by a person regarding consequences of a definite action in terms of unfavorable or favorable. In any type of decision making, attitude has an influence on that decision (Fazio, Ledbetter, & Towles-Schwen, 2000). There are some authors that suggest that attitude plays an important role in determining intention and this construct cannot be ignored (Kashif et al., 2018; Yakasai & Jusoh, 2015). Therefore, the following hypotheses are proposed for the current study:

  • H3: Attitude has a significant and positive influence on CPI

  • H3a: CPI significantly and positively mediates the relationship between attitude and OSB

Subjective norms

Individual behavior is influenced by some of the external factors like the perceived pressure of family, friends, and relatives to perform decision to purchase something (Ajzen, 1991; Laohapensang, 2009). Similarly, subjective norms is considered an important element of TPB theory and it refers of a personal perception that depends upon his/her friends, family, and relatives to act or not the targeted behavior (Ajzen, 1991; Francis et al., 2004). There are some prior researchers that consider subjective norms and their focus is on infused soft drinks (Yoon Kin Tong, Fa Tong, & Yin, 2012), intention to do job in the older age (Lu, 2012), participation in the community that purchase online (Zhou, 2011), tele-presence system (Park, 2013), and online shopping (Jamil, 2011; Laohapensang, 2009; Tseng, Lee, Kao, & Wu, 2011; Xie, Zhu, Lu, & Xu, 2011). The respondents in the above-mentioned studies were general public that includes professional and also (Park, 2013; Tseng et al., 2011; Xie et al., 2011) university students (Yoon Kin Tong et al., 2012; Zhou, 2011). According to Ajzen (1991), subjective norms have no direct significant association with the behavior of the consumers that subjective norms create intention and after that intention create behavior. Some of the prior studies reveal that purchase intention mediates the relationship between subjective norms and behavior (Limayem, Khalifa, & Frini, 2000; Zhou, 2011). Subjective norms have attention in examining intention (Amaro & Duarte, 2015; Singh & Srivastava, 2018). By acknowledging the above-mentioned studies, we propose the following hypotheses for the current study:

  • H4: Subjective norms have a significant and positive influence on CPI

  • H4a: CPI significantly and positively mediates the relationship between subjective norms and OSB

Perceived behavioral control

Ajzen (1991) presented the concept of self-belief of an individual that has an influence on intentions. Later, this concept is known as perceived behavioral control. It refers to a personal belief regarding his/her personal capabilities of exhibiting behavior (Brouwer et al., 2009). Moreover, perceived behavioral control is conceptualizing the individual’s personal ability to control their actual behavior that executes or not executes the transaction which depends upon their capabilities (Francis et al., 2004). Perceived behavioral control is another factor that helps individual engagement in searching appropriate information and it is alike to helping conditions of unified theory of acceptance and use of technology (UTAUT) and express individual thinking if he/she has required capabilities, resources, and a sense of controlling the decision to perform or not (Gao & Bai, 2014). Perceived behavioral control is a factor that plays an important role in determining intention (Casaló, Flavián, & Guinalíu, 2010; Kashif et al., 2018; Lu, Zhou, & Wang, 2009). The following are the proposed hypotheses:

  • H5: Perceived behavioral control has a significant and positive influence on CPI

  • H5a: CPI significantly and positively mediates the relationship between perceived behavioral control and OSB.

Limitations of TPB theory and TAM model

In the upper section, TPB theory and TAM model are explained. As TBP theory and TAM model ignore some of the factors that also play an important role in determining consumer decision to purchase or not. These theories ignore the effect of perceived risks, trust, commitment, customer satisfaction, financial resources, past experience of consumer, economic factors (family income, level of standard of living, personal income, discretionary income, disposable income, and expectation regarding future income), psychological factors (motivation, perception, learning), and personal factors (age, occupation, economic situation, life style, personality, and income). In other words, a person has intention to purchase something but his/her intention can change due to these factors such as he/she is risk averse and due to perceived risk attached with online shopping their decision might change. Trust and commitment is used in this study as a moderating variable between intention and behavior.

Trust

Trust means “the willingness of a person to be vulnerable to the actions of another party based on the expectation that the other will perform a particular action important to the trustor, irrespective of the ability to monitor another party” (Mayer, Davis, & Schoorman, 1995). Trust plays a significant role in both offline shopping and internet shopping. Trust plays a major role to enhance the behavior of consumer (Hsu, Chuan-Chuan Lin, & Chiang, 2013). In addition, trust is an important indicator that has an influence on shopping behavior of consumer (Mukherjee & Nath, 2007). Trust is an indicator that plays an important role in examining the actual behavior of the consumer (Akroush & Al-Debei, 2015; Dost, Illyas, & Rehman, 2015). Hence, above-mentioned studies show that trust is a major indicator that has a significant influence on online shopping behavior of consumers. Proposed hypotheses are as follow:

  • H6: Trust has a significant and positive influence on CPI

Commitment

Commitment refers to “an enduring desire to maintain a valued relationship” (Moorman, Zaltman, & Deshpande, 1992). Commitment is an integral component of a successful long-range relationship (Dwyer, Schurr, & Oh, 1987; Morgan & Hunt, 1994). One of the studies reveal that commitment is effective as well as a durable predictor in influencing behavior (Lokhorst, Werner, Staats, van Dijk, & Gale, 2013). In prior studies, less attention has been paid on the commitment between intention and behavior, and the current study fulfills this gap. We proposed the following hypotheses for empirical testing:

  • H7: Commitment has a significant and positive influence on OSB

Consumer purchase intention and online shopping behavior

Ajzen (1991) recommends that intention is an important indicator of what extent individuals perform a certain behavior and also tells that how many attempts individuals try to perform a definite behavior. In contrast, lack of intention to purchase goods by using the internet is the major issue in online shopping (He et al., 2008). One of the prior studies on Thai consumers conclude that intention to purchase through internet influenced by attitude, subjective norms, and PBC (Laohapensang, 2009) and consumer purchases intention significantly influence on the behavior of consumers to buy online. Some of the prior researchers reveal that intention plays an important role in influencing actual behavior of a consumer to perform the transaction (He et al., 2008; Laohapensang, 2009; Pavlou & Fygenson, 2006). One of the studies elucidated that the intention to purchase does not translate into actual buying behavior (Kim & Jones, 2009). In contrast, intention plays a significant role in determining the behavior of consumer (He et al., 2008; Kashif, Sarifuddin, & Hassan, 2015; Laohapensang, 2009; Lim et al., 2016; Pavlou & Fygenson, 2006). The above-mentioned studies show that findings are not conclusive because some show more significant influence of intention with behavior and some show a less significant influence of intention over behavior. Moreover, a meta-analysis on TBP theory, Sutton (1998) reported that TPB theory explained within 40% to 50% of the variance in intention and 19% to 38% in behavior. There are some prior studies that reveal that the relationship between intention and actual behavior of consumer is consistent, but this relation can strengthen by using some moderators (Elliott, Armitage, & Baughan, 2003; Hagger et al., 2002). Harris and Hagger (2007) supported this argument that a consumer may have behavioral intention but fail to perform the actual behavior. Sutton (1998) tells that only intention is not sufficient to explain behavior and there is a need of another variable to explain behavior. Hence, there is a need to add another variable that strengthens this relationship. In the current study, we are using commitment and trust as moderating variables between consumer purchase intention and online shopping behavior.

  • H8: CPI has a significant and positive influence on OSB

  • H9: Trust significantly and positively moderate the relationship between CPI and OSB

  • H10: Commitment significantly and positively moderate the relationship between CPI and OSB

Research methodology

The research methodology is a portion that has much attention in the eyes of researchers and plays a significant role for any kind of research to determine the objectives of the research (Rehman, Mohamed, & Ayoup, 2019). Researchers conclude that there is a need to use suitable analysis techniques in attaining research objectives and tries to solve the practical and theoretical problem (Rehman, Mohamed, et al., 2019). Therefore, in this study, to see the nature, problem, and research objectives a quantitative approach and co-relational research design used to collect data and analyze hypotheses (Rehman, Mohamed, et al., 2019). In addition, deductive reasoning approach used and connected with quantitative research design in a situation where the theoretical framework developed on the base of existing theory (Rehman, Bhatti, & Chaudhry, 2019). Therefore, this study used deductive reasoning approach instead of inductive reasoning approach because of theoretical framework developed on the base of existing theory.

Instruments

The theoretical framework of this research consists of nine variables. Each construct of framework measures through various items. Some previous studies used to adopted and adapt items of variables. Each item was measured by using a 5-Likert scale that has range from strongly disagree (1) to strongly agree (5). Perceived ease of use consists of eight items and perceived usefulness consist of seven items that is adapted from (Davis et al., 1989). Davis et al. (1989) developed the questionnaire regarding perceived ease of use and perceived usefulness and the authors adopt or adapt the items of Davis in their studies. Attitude consists of five items adopted from Ajzen (2002), subjective norms consists of three items adapted from Kassem, Lee, Modeste and Johnston (2003), consumer purchase intention consist of three items adopted from Thananuraksakul (2007), perceived behavioral control consists four items adopted from Moshrefjavadi, Dolatabadi, Nourbakhsh, Poursaeedi and Asadollahi (2012), trust consist of five items adapted from Constantinides, Lorenzo-Romero and Gómez (2010), commitment consists of four items adapted from Park and Kim (2003), and online shopping behavior consists of eight items and adopted from Masoud (2013).

Population and sampling

The current research is based on Pakistani consumers that purchase goods online and it includes students and lecturer in higher education commission (HEC) recognized universities in Punjab, Pakistan. For this purpose, only educated people were considered because they know well regarding technology as compared to uneducated people. Questionnaires were distributed among respondents personally and 5-point Likert scale was used for the collection of data. According to Babakus and Mangold (1992), 5-point Likert scale was used for data analysis to enhance the response rate as well as response quality because this minimizes the irritation level of respondent as compared to 7-point Likert scale. The 5-point Likert scale has a range from strongly disagree (1) to strongly agree (5), and this scale is mostly suggested by researchers because it minimizes the irritation/frustration level of respondents and this automatically increases the response quality and response rate (Sachdev & Verma, 2004).

In addition, in the current study, area cluster sampling technique was used to collect data from respondents. Formation of the clusters was based on districts that have HEC recognized universities of Punjab, Pakistan. In Punjab, Pakistan with a total of 36 districts, there are only ten districts with HEC recognized universities such as Lahore, Multan, Rawalpindi, Bahawalpur, Rahim Yar Khan, Faisalabad, Gujrat, Sargodha, Sialkot, and Dera Ghazi Khan. In the current study, a total of ten clusters were made and only six clusters were chosen randomly for data collection, namely Lahore, Faisalabad, Multan, Rawalpindi, Bahawalpur, and Gujrat. After the selection of particular clusters, the respondents were chosen randomly for filling questionnaires from each of the clusters. The reason to select the province of Punjab is because Punjab is the biggest province of Pakistan in terms of population. HEC recognized universities were taken for collection of data as this study focused on educated people because educated people mostly purchase goods through internet. The results of this study can be generalized all over Pakistan because this study covers the biggest province of Pakistan that can represent the whole Pakistan. According to Sekaran and Bougie (2016), they suggested all the above-mentioned steps for the area cluster sampling technique. Moreover, this technique was chosen due to the reason that it reduces the cost of collecting data as well as most significantly it is an appropriate approach when the desired population spread on a wide area and this approach is satisfactory to cover the maximum number of population (Sekaran & Bougie, 2006).

Sample size

According to Comrey and Lee (1992), there are different ranges of sample size regarding their strength such as sample size below 50 is considered weaker, within 51 to 100 considered weak, within 101 to 200 considered adequate, sample size 201 to 300 considered good, sample size 500 considered very good, and 1000 considered excellent sample size. Hence, this research used sample size within 201 to 300 which is considered good. Two hundred fifty questionnaires were distributed among (students, lecturers) and only 187 questionnaires were used for analysis purpose and the remaining 63 questionnaires were excluded due to some missing values and some of the respondent did not return back the questionnaires. Hence, the current study fulfills the above-mentioned requirement.

Demographics Information

In this section, questions were discussed regarding the demographic profile of respondents. In our sample, 59% of the respondents were males and 41% of the respondents represent females. Most of the respondents were a master degree holder and consists 96 (51.33%), 49 respondents did M.Phil (26.20%), and the remaining were bachelor class students. Regarding the age group of respondents, 57% of the respondents were within 18 years to 27 years. In the age group, 28 to 37 years represent 39% of respondents and the remaining were more than 38 years.

Statistical analysis results

In this research, the proposed hypotheses were empirically tested by using SmartPLS 3.0. The reason behind using SmartPLS 3.0 is that it gives better results and deal better simple as well as complex or large research models and there is no requirement for normality test also (Bamgbade, Kamaruddeen, & Nawi, 2015; Hair Jr, Hult, Ringle, & Sarstedt, 2014). Furthermore, some of the prior researchers reveal that PLS-SEM technique gives better results as compared to covariance-based technique (Afthanorhan, 2013; Hair Jr et al., 2014). In PLS-SEM, two models such as the measurement model and structural model were estimated. In this research, we use both the above-discussed models.

Measurement model (outer model)

For estimating outer or measurement model, there is a need to calculate three things such as content validity, convergent validity, and the final one is the discriminant validity (Hair Jr, Ringle, & Sarstedt, 2013).

Content validity

Content validity means a condition where the loadings of a particular variable are higher than other variable items in the same columns and rows. In this research, content validity is measured with the help of factor loadings as shown in Table 1 of cross-loadings as suggested by some prior researchers (Chin, 1998b; Hair Jr, 2010). For the current research, all items of respective variables highly loaded and higher than other variables.

Table 1 Factor loading and cross loadings

Convergent validity

Convergent validity refers to the degree to see that items of variable measures the same variable (Rehman, Bhatti, et al., 2019). Convergent validity is to make certain that all the items of variables efficiently reflect their corresponding indicator (Zhou, 2013). Fundamentally, convergent validity shows the level to which a predictor correlates positively with another factor/predictor of the same variable (Hair Jr et al., 2014). There are three things required in SEM technique for measuring the convergent validity of a construct like factor loadings, composite reliability (CR), and the final one is average variance extracted (AVE) (Fornell & Larcker, 1981). Importantly, factor loadings of all items of variables should be highly loaded and statistically measure the particular constructs. The standardized criterion of factor loading, AVE, and CR should be equal to or more than 0.50, 0.50, and 0.70 respectively. All items that have factor loadings lesser than the standardized value that is 0.50 removed for getting desired AVE and CR value in this research (Hayduk & Littvay, 2012) and items that have factor loading above than standardized value will help to build better theoretical framework. Value of Cronbach’s alpha must be greater than 0.60 as recommended (Nunnally, 1978). As shown in Table 2 that factor loading (at least 0.50), AVE (at least 0.50), CR (at least 0.70), rho_A (> 0.70), and Cronbach’s alpha criterion fulfills. Therefore, this research confirmed the criteria of convergent validity of the theoretical framework (Bagozzi & Yi, 1988).

Table 2 Factor loadings, average variance extracted (AVE), and composite reliability (CR)

Discriminant validity

Discriminant validity means a situation where a researcher sees that every indicator of theoretical framework are statistically different (Rehman, et al., 2019). Discriminant validity means a condition in which researchers see two variables statistically different or not. It demonstrates the level to which a variable in an actual sense different from other variables on the basis of empirical gauges (Hair Jr et al., 2014). Items of the specific variable must have a higher variance than other variables in the theoretical model. In the current research, discriminant validity calculated on the suggestions of (Fornell & Larcker, 1981). To use this criterion, we compare the diagonal upper values that come by taking the square root of AVE with below values. The diagonal upper value must be greater than other below values in the same column and row. Table 3 shows that the standardized criteria of discriminant validity fulfill this study.

Table 3 Discriminant validity

Table 4 shows that the standardized criteria for Heterotrait-Monotrait ratio (HTMT) meet this study as suggested (Hair Jr et al., 2013).

Table 4 Heterotrait-Monotrait ratio (HTMT)

Structural or inner model and testing of hypotheses

In the upper portion, we ascertain the requirements of measurement or outer models like content, discriminant, convergent validity, and reliability. In this section, we determine the hypotheses that proposed earlier by running two things in SmartPLS 3.0. First, run Algorithm technique and after that run Bootstrapping technique. As shown in Fig. 2 and Table 5, we have 15 hypotheses in which eight are direct hypotheses and seven are indirect (mediating and moderating) hypotheses.

Fig. 2
figure 2

Measurement model

Table 5 Direct and indirect relationships

The predictive relevant of study model

In the current research, we are focusing on two things to access predictive relevance of theoretical model of studies such as cross-validated redundancy and R-square. R-square refers to the variance that explained all independent constructs. Table 6 shows that 39.7% CPI is explained by all independent variables. While OSB explained 25.1% due to CPI and when moderators add then this ratio increase from 25.1 to 32.3%. Cohen (1988) gives the criterion for R-square that value of R2 within 0.02–0.13 is considered weak, 0.13–0.26 moderate, and more than 0.26 substantial. In this study, the R2 value of CPI and OSB is considered substantial. Furthermore, the cross-validated redundancy is assessed to determine the quality of the research model. Cross-validated redundancy is calculated in SmartPLS by using blindfolding technique, and this process requires from researcher side to remove a few of data values that consider missing values. The value of Q2 must be greater than zero (Chin, 1998a; Henseler, Ringle, & Sinkovics, 2009). Table 6 shows that the current study meets the standardized criteria (Fig. 3).

Table 6 The predictive relevance of study model
Fig. 3
figure 3

Structural model

The effect size of a model

R-square values tell about the strength of the research model. However, change in R-square value by removing independent constructs one-by-one from the research model and then add to know the contribution of the removed construct (Hair Jr et al., 2014). There is a criterion of effect size like 0.02 considered as small effect, 0.15 considered as medium effect, and 0.35 considered as high effect (Cohen, 1988). Tables 7and 8 shows that all variables have small effect size excluding CPI that show high effect size.

Table 7 Effect size of independent variables on the dependent variable (OSBs)

Results

For direct relationship hypotheses, seven out of eight hypotheses supported and all indirect hypotheses supported. For example, perceived usefulness (PU) has a significant and positive influence on CPI as (β value 0.261, t value 2.320, and p < 0.05. Moreover, perceived ease of use (PEU) has a significant and positive influence on CPI as (β = 0.227, t = 3.203, p < 0.05). Furthermore, the attitude has a positive and significant influence on CPI as beta value = 0.184, t value = 2.219, and a p value less than 0.05. Meanwhile, subjective norms have a positive and significant influence on CPI as β value 0.144, t value 1.672, and p < 0.05. In addition, PBC has a significant and positive influence on CPI as β value 0.142, t value 2.474, and p < 0.05. Moreover, trust has positive and significant influence on OSB as (beta value = 0.142, t value = 2.030, p < 0.05). Despite this, the commitment has insignificant influence OSB as (β value = − 0.056, t value = 0.746, p > 0.05). CPI significantly and positively mediates the relationship between PU (β = 0.135, t = 2.308, p < 0.05), PEU (β = 0.117, t = 2.9079, p < 0.05), attitude (β = 0.095, t = 1.963, p < 0.05), subjective norms (β = 0.074, t = 1.720, p < 0.05), PBC (β = 0.073, t = 2.443, p < 0.05), and OSB. Trust significantly and positively moderate the relationship between CPI and OSB as (β = 0.130, t = 2.298, p < 0.05). Moreover, commitment also positively and significantly moderate the relationship between CPI and OSB as (β = 0.117, t = 1.482, p < 0.10). In this respect, only one hypothesis H7 is not accepted (Table 8).

Table 8 Effect size of independent variables on the dependent variable (CPI)

Discussion

The objective to write the current paper is to determine the influence of PU, PEU, attitude, subjective norms, and PBC on CPI. Then see the moderating effect of trust and commitment between CPI and OSB in the context of Pakistan. The current research is quantitative and descriptive in nature. Results revealed that PU has a significant and positive influence on CPI and supported our hypotheses H1. Our results are similar to the work of Lim et al. (2016). Moreover, CPI significantly mediates the relationship between PU and OSB and supported our hypotheses H1a. PEU have a significant and positive influence on CPI and supported our hypotheses H2. Our work is the same as the work of Davis (1989), Gao and Bai (20140, and Rahman, Khan and Islam (2013). CPI significantly mediates the relationship between PEU and OSB and supported our hypotheses H2a. Attitude has a significant and positive influence on CPI and supported our hypotheses H3. The results are the same as the findings of Kashif et al. (2018) and Yakasai and Jusoh (2015). CPI significantly mediates the relationship between attitude and OSB and supported our hypotheses H3a. Subjective norms have significantly and positively influence on CPI and supported our hypotheses H4. The findings are consistent with the findings of Lim et al. (2016). CPI significantly mediates the relationship between subjective norms and OSB and supported our hypotheses H4a. PBC has a significant and positive influence on CPI and supported our hypotheses H5. CPI significantly mediates the relationship between PBC and OSB and supported our hypotheses H5a. Trust has a significant and positive influence on OSB and supported our hypotheses H6. Our findings are consistent with the work of Akroush and Al-Debei (2015) and Dost et al. (2015). Commitment has no influence on OSB and our hypotheses H7 is not accepted. CPI has a significant and positive influence on OSB and supported our hypotheses H8. The results are consistent with the work of Lim et al. (2016). Trust and commitment significantly and positively moderate the relationship between CPI and OSB and our hypotheses H9 and H10 accepted.

Conclusion

This study concludes that perceived usefulness, perceived ease of use, attitude, subjective norms, and perceived behavioral control have a positive and significant influence on consumer purchase intention. Consumer purchase intention (CPI) mediates between all five independent constructs and online shopping behavior (OSB). Commitment and trust significantly moderate the relationship between consumer purchase intention and internet shopping behavior also has a direct influence on online shopping behavior. This study significantly contributes to the literature of perceived usefulness, perceived ease of use, attitude, subjective norms, perceived behavioral control, trust, commitment, CPI, and OSB. Hence, CPI plays a significant role in determining OSB as suggested TPB theory.

Theoretical implication

This study plays a significant contribution in theoretical terms to critically consider the influence of two theories elements such as TBP theory and TAM model on online shopping behavior through consumer purchase intention. After that, this study examines the mediating effect of CPI between TPB and TAM factor with online shopping behavior. As TPB theory is the best theory in predicting consumer behavior but it also has some limitations such as it ignores the effect of perceived risks, trust, commitment, customer satisfaction, financial resources, and past experience of consumer. Two factors, namely trust and commitment, were used in this study in the light of TPB theory and TAM model to determine online shopping behavior. This study introduces first time trust and commitment as a moderating variable between consumer purchase intention and online shopping behavior because TAM and TPB model ignores the influence of trust and commitment on consumer behavior. In the current study, most of the part of theoretical model covers TPB theory as this theory predicts better the behavior of consumers. This is the pioneer studies that use mediating effect of CPI and the moderating effect of trust and commitment to determine OSB of consumers.

Practical implication

The outcomes of current research have numerous practical implications for internet retailers. The current research reveals that both TAM model and TPB theory have a significant and positive influence on consumer purchase intention. Consumer purchase intention significantly mediates the relationship between TAM model and TPB theory factors and OSB. This study gives an idea to online retailers in the whole world that considers perceived usefulness, perceived ease of use, attitude, subjective norms, perceived behavioral control, trust, and commitment if they want to enhance their online shopping sales in the long run. According to Sutton (1998), only considering consumer purchase intention cannot predict consumer behavior accurately as there are some other factors that have significant role in determining online shopping behavior of consumers. This is the reason that in this study we used two moderating variables such as trust and commitment between consumer purchase intention and online shopping behavior. An online retailer needs to build the trust of consumers to purchase online instead of purchase goods offline because this research tells that trust has a significant and positive influence on online shopping behavior of consumers. The current study findings help online retailers that the user interface of the website should be easy to understand for consumers if online retailers want to enhance online shopping behavior of consumers. According to TPB theory, there is no direct relationship between attitude, subjective norms, and perceived behavior control that is why in the current study we examined the influence of these factors first on consumer purchase intention and then examined the consumer purchase intention influence on online shopping behavior. Hence, the current study confirms the TPB theory. The findings of this study are applicable in Pakistan and the entire world because TPB theory and TAM model are highly accepted all over the world and there are issues regarding trust and commitment that exist in any part of this world.

Limitations and suggestions

This research is just like other prior studies that have some limitations that must be recognized in future studies related to these constructs. The current study examined the influence of PU, PEU, attitude, subjective norms, and PBC on CPI directly and in future, there is need to add some mediating/moderating variables (hedonic motivation, electronic satisfaction, and awareness) between TAM and TPB elements and CPI. Moreover, there is a need to study further TAM and TPB elements in one study with OSB in developing and developed countries.