Solution: After version 2345 of group buying, the previous Group Buying Website Cannot include group buying information

Source: Internet
Author: User

 

Solution: After version 2345 of group buying, the previous Group Buying Website Cannot include group buying information

2345 the Group Buying navigation was recently revised, so that the Group Buying information of some group buying websites could not be included, mainly because 2345 made some adjustments to the API structure, if your group purchases use the most earthy program, this article can solve your problem and save the code to overwrite the previous file.

 

<? Php <br/> require_once (dirname (_ file __)). '/app. PHP '); <br/> header ('content-type: Application/XML; charset = UTF-8 '); <br/> $ daytime = strtotime (date ('Y-m-d ')); <br/> $ condition = array (<br/> 'Team _ type' => 'normal', <br/> "begin_time <= {$ daytime }", <br/> "end_time >{$ daytime}", <br/>); <br/> $ teams = DB: limitquery ('team ', array (<br/> 'condition '=> $ condition, <br/>); <br/> $ OA = array (); <br /> $ Si = array (<br/> 'sitename' => $ ini ['system'] ['sitename'], <br/> 'wwwprefix' => $ ini ['system'] ['wwwprefix'], <br/> 'imgprefix' => $ ini ['system'] ['imgprefix'], <br/> ); </P> <p> $ cond2 = array ('zone '=> 'city'); <br/> $ info2 = DB: limitquery ('category ', array (<br/> 'condition '=> $ cond2, <br/> 'order' => 'order by id desc', </P> <p> )); <br/> $ citys2 = utility: getcolumn ($ info2, 'name'); <br/> foreach ($ C Itys2 as $ K) {<br/> foreach ($ teams as $ one) {<br/> // $ city = table: Fetch ('category ', $ one ['city _ id']); </P> <p> $ group = table: Fetch ('category ', $ one ['group _ id']); <br/> $ item = array (); <br/> $ item ['loc '] = $ Si ['wwwprefix']. "/team. PHP? Id = {$ one ['id']} "; <br/> $ item ['data'] = array (); <br/> $ item ['data'] ['display'] = array (); <br/> $ o = array (); <br/> $ o ['website'] = $ ini ['system'] ['sitename']; <br/> $ o ['siteurl'] = $ ini ['system'] ['wwwprefix']; <br/> $ o ['city'] = $ K; <br/> $ o ['sort '] = $ group ['name']; <br/> $ o ['title'] = $ one ['title']; <br/> $ o ['image'] = $ Si ['imgprefix']. '/static /'. $ one ['image']; <br/> $ o ['starttime'] = $ one ['in in _ time']; <br/> $ o ['endtime'] = $ one ['end _ time']; <br/> $ o ['value'] = $ one ['market _ price']; <br/> $ o ['price'] = $ one ['Team _ price']; <br/> if ($ one ['market _ price']> 0) {<br/> $ o ['rebate'] = moneyit (10 * $ one ['Team _ price']/$ one ['market _ price']); <br/>} else {<br/> $ o ['rebate'] = '0 '; <br/>}< br/> $ o ['bought '] = ABS (intval ($ one ['now _ number']); <br/> // 2345 update and modify solution 1 <br/> $ o ['spend _ start_time '] = 0; <br/> $ o ['spend _ close_time '] = 0; <br/> $ o ['longyun'] = 0; <br/> $ o ['latitude '] = 0; <br/> $ o ['collect'] = 0; <br/> // 2345 update and modify <br/> // 2345 update and modify solution 2 <br/>/* $ o ['spend _ start_time '] = $ one ['In in _ time']; <br/> $ o ['spend _ close_time '] = $ one ['end _ time']; <br/> $ o ['longyun'] = 0; <br/> $ o ['latitude '] = 0; <br/> $ o ['collect'] = 0; */<br/> // 2345 update and modify <br/> $ item ['data'] ['display'] = $ O; <br/> $ OA [] = $ item; </P> <p >}< br/> output :: xmlbaidu ($ OA); <br/> 

You can modify the settings based on your website!

 

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.