Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the order purchase of dedecms5.7 Mall system

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the dedecms5.7 Mall system order purchase how to modify, the article is very detailed, has a certain reference value, interested friends must read it!

Dedecms5.7 Mall system order purchase how to modify?

Method 1.

To modify the order procedure of DEDE itself, doesn't DEDE just require registered members? Simple, then I now register a public member to write dead in the program, that is, in the user name and password field, I automatically write the value on OK, hehe, of course, if you want to be smart, if the user is a member, use the user's member number, otherwise use the default account is also simple ah JS!

Method 2.

You can do this and try to turn on the member function in the background first. if you don't want to have a member to join, you can prohibit the member from registering.

Then find the plus/carbuyaction.php file

Delete the following code

The code is as follows:

/ / confirm the user login information if ($cfg_ml- > IsLogin ()) {$userid = $cfg_ml- > masked ID;} else {$username = trim ($username); $password = trim ($password); if (empty ($username) | | $password) {ShowMsg ("Please login!" , "- 1", 0 2000); exit ();} $rs= $cfg_ml- > CheckUser ($username,$password); if ($rs==0) {ShowMsg ("user name does not exist!" , "- 1", 0P.2000); exit ();} else if ($rs==-1) {ShowMsg ("wrong password!" , "- 1", 0jue 2000); exit ();} $userid = $cfg_ml- > masked ID;}

In my site, these two can not completely solve the problem, but a combination of two people, just meet my requirements. There is a problem in the first person's thinking, that is, "if someone buys something and does not pay, later users will not have to pay together to see other unpaid orders." some people have raised this question, which is not ideal. After the second person deleted the code, the login information of the user was not associated with the order, so we asked tourists to order and members to buy. As follows, I made the following changes:

/ plus/carbuyaction.php

The code is as follows:

/ / confirm the user login information if ($cfg_ml- > IsLogin ()) {$userid = $cfg_ml- > masked ID;} else {$username = trim ($username); $password = trim ($password); if (empty ($username) | | $password) {ShowMsg ("Please login!" , "- 1", 0 2000); exit ();} $rs= $cfg_ml- > CheckUser ($username,$password); if ($rs==0) {ShowMsg ("user name does not exist!" , "- 1", 0P.2000); exit ();} else if ($rs==-1) {ShowMsg ("wrong password!" , "- 1", 0jue 2000); exit ();} $userid = $cfg_ml- > masked ID;}

Change to

The code is as follows:

/ / confirm user login information if ($cfg_ml- > IsLogin ()) {$userid = $cfg_ml- > masked ID;} else {$username = trim ($username); $password = trim ($password); if (empty ($username) | | $password) {$userid = 0;} else {$rs= $cfg_ml- > CheckUser ($username,$password); if ($rs==0) {ShowMsg ("user name does not exist!" , "- 1", 0P.2000); exit ();} else if ($rs==-1) {ShowMsg ("wrong password!" , "- 1", 0jue 2000); exit ();} $userid = $cfg_ml- > masked ID;}}

The modification means that if the user is not logged in, then I will assign 0 to id, so that as long as I see the order placed at 0 in the background, it is the tourist's. After the current test, no problem was found.

The above is all the contents of how to modify the purchase order of dedecms5.7 Mall system, thank you for your reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 300

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report