Add the point shopping function to ecmall

Source: Internet
Author: User

Add the record points field to the member table. Run "alter table 'ecm _ member' add 'xfmoney' double not null;" in phpMyAdmin. No matter where the points come from, this is an idea.

First, I want to talk about some of my development habits. I like some methods and try to write them by myself without modifying the functions of the original system. The first is difficult, and the second is inconvenient to upgrade, I put Fun in the root directory. PHP file. I will write all the method functions in this file, fun. PHP also references a Peizhi. the PHP file records some basic information. For example, if the shopping price is 100 free of charge, the 100 can be recorded in Peizhi. PHP file, which can be changed at any time.

Write include ('fun. php') in the fourth line of the INDE. php file ');

1. Let's change the post office remittance to point-based shopping. (There is almost no post office remittance now. ^_^) ages/SC-GBK/payment/post. Lang. php file

2. Install point shopping in the Payment Method

3. Replace the post office image with the image in the "des/payments/post/logo.gif" format.

4. APP/cashier. app. PHP, about 93 rows. Change the payment method to online payment, and the number of all rows is about, because as the change may change, you can search for "modify ".

5. the modification here mainly adds some judgment to verify whether the member has the credit app/cashier. app. PHP, there are something I added at the beginning of 109 lines, and there is an SQL function, which is the point of the shopping member, the point field name I set is xfmoney (this name is determined by the customer and cannot be understood ......), A "xftixian" is also defined ",

6. ages/SC-GBK/cashier. lang. PHP adds two texts. The GBK version cannot write text in the template, which is garbled. If you change the template to GBK encoding, you can.

7. themes/mall/default/cashier.payment.html starts at around 38 lines. I added a piece of code for two purposes, determine whether the credit of the member is greater than the price of the product and whether the credit of the member is greater than the xftixian. This is the customer's requirement. It is required that the member whose credit is greater than the credit can use the credit to shop.

8. The app/cashier. App. php contains about 233 lines, and the app/cashier can be used to detect and prevent 37 lines of attacks, with modifications made.

Attachment download

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.