Exemplo n.º 1
0
 public function getExtraSectionTag($filedname = array(), $product_id, $section, $template_data, $categorypage = 0)
 {
     $extraField = new extraField();
     $str = array();
     for ($i = 0; $i < count($filedname); $i++) {
         if ($categorypage == 1) {
             if (strstr($template_data, "{producttag:" . $filedname[$i] . "}")) {
                 $str[] = $filedname[$i];
             }
         } else {
             if (strstr($template_data, "{" . $filedname[$i] . "}")) {
                 $str[] = $filedname[$i];
             }
         }
     }
     $dbname = "";
     if (count($str) > 0) {
         $dbname = "'" . implode("','", $str) . "'";
     }
     $template_data = $extraField->extra_field_display($section, $product_id, $dbname, $template_data, $categorypage);
     return $template_data;
 }
Exemplo n.º 2
0
     if (strstr($template, "{product_category}")) {
         $category = $producthelper->getSection('category', $compare[$i]["category_id"]);
         $template = str_replace('{product_category}', $exp_div . $category->category_name . $div_end . $td_end . $td_start . "{product_category}", $template);
     }
     $template = str_replace('{remove}', $exp_div . $remove . $div_end . $td_end . $td_start . "{remove}", $template);
     if (strstr($template, "{add_to_cart}")) {
         $addtocart = $producthelper->replaceCartTemplate($compare[$i]["product_id"], 0, 0, 0, '{form_addtocart:add_to_cart1}');
         $template = str_replace('{add_to_cart}', $exp_div . $addtocart . $div_end . $td_end . $td_start . "{add_to_cart}", $template);
     }
     // Extra field display
     for ($tag = 0; $tag < count($product_tag); $tag++) {
         $str = "'" . $product_tag[$tag] . "'";
         if ($i != $compare['idx'] - 1) {
             $template = str_replace('{' . $product_tag[$tag] . '}', $exp_div . '{' . $product_tag[$tag] . '}' . $div_end . $td_end . $td_start . '{addedext_tag}', $template);
         }
         $template = $field->extra_field_display("1", $product->product_id, $str, $template);
         $template = str_replace('{addedext_tag}', '{' . $product_tag[$tag] . '}', $template);
     }
 }
 $template = str_replace('{expand_collapse}', "", $template);
 $template = str_replace('{product_name}', "", $template);
 $template = str_replace('{product_image}', "", $template);
 $template = str_replace('{manufacturer_name}', "", $template);
 $template = str_replace('{discount_start_date}', "", $template);
 $template = str_replace('{discount_end_date}', "", $template);
 $template = str_replace('{product_price}', "", $template);
 $template = str_replace('{product_s_desc}', "", $template);
 $template = str_replace('{product_desc}', "", $template);
 $template = str_replace('{product_rating_summary}', "", $template);
 $template = str_replace('{product_delivery_time}', "", $template);
 $template = str_replace('{product_number}', "", $template);