Ectouch How to modify virtual sales quantity

Source: Internet
Author: User

1. Reference:
Http://zhidao.baidu.com/link?url=5OEkRlKqtRcmnO6iyW2pq-gw1aj-1S6QdImmBkQZHHt6tcvT50aIf_ 1nibp3t6urm8nic8if0u6ryxcx7b9qfhgke7sipciidycrsywugm_

After experimentation, this method is not used either.

=================================================================================================
After 4 hours of analysis, it was found that:

2. Location:

A) after installation of Ectouch 1.7, a data table is created: Ecs_touch_goods, which contains goods_id and Sales_volume fields. Is the Sales Quantity record table.

B), under the. \mobile\include\apps\default\common directory, there are files: function.php

This file has a function to query sales: function Get_goods_count ($goods _id), so modify the following:


/* Inquire about sales of this product */

/*1, comment out the following SQL query statement */
/* $sql = ' SELECT ifnull (SUM (G.goods_number), 0) as Count '.
' From '. M ()->pre. ' Order_info as O, '. M ()->pre. ' Order_goods as G '.
"WHERE O." order_id = G. Order_Id ".
"And O. Order_status ". Db_create_in (Array (os_confirmed, os_splited)).
"And O. Shipping_status ". Db_create_in (Array (ss_shipped, ss_received)).
"And O. Pay_status ". Db_create_in (Array (ps_payed, ps_paying)).
"and G. goods_id = ' $goods _id ' "; * *
/*2, change to */
$sql = ' SELECT sales_volume as Count from '. M ()->pre. ' Touch_goods WHERE goods_id = '. $goods _id;
/*3, modify end */

$result = M ()->getrow ($sql);
/*4, if $result [' count ']=null then return 1 else if there is no record in the Sales Quantity table, it should be returned 0, pending modification * /
return $result [' count '];

Ectouch How to modify virtual sales quantity

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.