Get the order product_id and the number of orders

Source: Internet
Author: User

PHP gets the number of product_id and relative IDs of the order

<?phpforeach($val->groupresults (2) as $key 2=$val 2):?> <trclass= "Evedata" shoppingcartid= "<?=$val 2->id?> "Productid=" <?=$val 2->product ()->id?> "freightid=" <?=$val 2->product ()->freight_id?> "> <td width=" 10% "><a href=" <?=$val 2->product ()->strurl ()?> "target=" _blank ">$val 2->strpic ()?> "class= "Img75"/></a></td> <td width= "33%" > <a href= "<?=$val 2->product ()->strurl ()?> "target=" _blank "><?=$val 2->product ()->title?></a><br/> <?phpif($val 2->shop ()->isvip ()):?> <a href= "javascript:void (0)" title= "VIP merchant"class= "SHOP_ICO_VIP" ></a> <?phpendif;? > <?phpif($val 2->product ()->is_24h>0):?> <a href= "javascript:void (0)" title= "<?=$val 2->product () Delivery within->is_24h?> hours "class= "shop_ico_24h" ></a> <?phpendif;? > <?phpif($val 2->product ()->is_aftermarket>0):?> <a href= "javascript:void (0)" title= "after-sales protection"class= "Shop_ico_baozhang" ></a> <?phpendif;? > <?phpif($val 2->product ()->is_7goodsreturn>0):?> <a href= "javascript:void (0)" title= "<?=$val 2->product ()->is_7goodsreturn?>+ days "class= "Shop_ico_7" ></a> <?phpendif;? > <?phpif($val 2->product ()->is_15renew>0):?> <a href= "javascript:void (0)" title= "<?=$val 2->product ()->is_15renew?>+ days for new "class= "Shop_ico_15" ></a> <?phpendif;? > <?phpif($val 2->product ()->is_wholesale>0):?> <a href= "javascript:void (0)" title= "wholesale"class= "Shop_ico_pifa" ></a> <?phpendif;? > </td> <td width= "13%" > <iclass= "I_gray" > Model: </i><?=$val 2->attrimodel ()->title?><br/> <iclass= "I_gray" > Category: </i><?=$val 2->attricategory ()->title?> </td> <td><bclass= "Eveunitprice" ><?=$val 2->product ()->price?>a<?=$val 2->product ()->id?></b></td> <td> <input type= "text"class= "num evenum" shoppingcartid= "<?=$val 2->id?> "Value=" <?=$val 2->number?> "/><br/> <iclass= "I_gray" > Stock: </i><?=$val 2->product ()->inventorysurplus ()?> </td> <td><iclass= "I_16red Eveprice" ><?=$val 2->pricesum ()?></i></td> <?phpif($key 2==0):?> <td rowspan= "3" >Way:<select name= "Logistics_type" onchange= "Freightprice ()" > <option value= "1" > Pickup </option> <option value= "2" > Shipping </option> </select> <br/>Fees:<spanclass= "Evelogisticsprice" >0.00</span> </td> <?phpendif;? > </tr>

Ways to get jquery

/* get the Product ID and number of products */            var data=[];            $ ('. Evedata ').  each (function(k,v) {                var tmp = {                    ' prodcut_id ': $ (this). attr (' ProductId '),                    ' Count ': $ (this). Find ('. Evenum '). Val (),                };                Data. push (TMP);            });            Param. Product = data;

Get the order product_id and the number of orders

Related Article

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.