关于睿艾科技

企业级电子商务及供应链解决方案


ZenCart更改运费及根据不同产品选择配送

新闻添加时间:2010-01-01 16:45:35

includes\templates\***\templates\tpl_checkout_shipping_default
  1. $cart = $_SESSION[cart];
  2. $contents = $cart->contents;
  3. while ($fruit_name = current($contents)) {
  4.   $pizza = key($contents);
  5.   $pieces = explode(":", $pizza);
  6.   $categories_id = zen_get_product_path((int)$pieces[0]);
  7.   $categories_duan = explode("_", $categories_id);
  8.   if ($categories_duan[0] == 14){
  9.     $the_categories = $categories_duan[0]//找到这个产品的目录ID
  10.     break;
  11.   }
  12.   $the_categories = $categories_duan[0];
  13.   next($contents);
  14. }
  15. $radio_buttons = 0;
  16. for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
  17.   if ($the_categories == 14){
  18.     //如果等于这个产品ID,直接对配置ID赋值
  19.     $i=1;
  20.   }
  21. // bof: field set
  22. // allows FedEx to work comment comment out Standard and Uncomment FedEx
  23. // if ($quotes[$i][’id’] != ’’ || $quotes[$i][’module’] != ’’) { // FedEx
  24. if ($quotes[$i][module] != ’’) { // Standard