Exemplo n.º 1
0
         $cart_mdata = str_replace("{category_name}", $manufacturer_products[$i]->category_name, $cart_mdata);
         $cart_mdata = str_replace("{category_heading_start}", "", $cart_mdata);
         $cart_mdata = str_replace("{category_heading_end}", "", $cart_mdata);
     } else {
         $cart_mdata = $cart_mdata1[0] . $cart_mdata2[1];
     }
     $cname = $manufacturer_products[$i]->category_name;
     $cart_mdata = str_replace("{category_heading_start}", "", $cart_mdata);
     $cart_mdata = str_replace("{category_heading_end}", "", $cart_mdata);
 }
 $link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $manufacturer_products[$i]->product_id);
 $product_name = "<a href='" . $link . "'>" . $manufacturer_products[$i]->product_name . "</a>";
 $cart_mdata = str_replace("{product_name}", $product_name, $cart_mdata);
 $cart_mdata = $producthelper->getProductOnSaleComment($manufacturer_products[$i], $cart_mdata);
 $cart_mdata = $producthelper->getProductNotForSaleComment($manufacturer_products[$i], $cart_mdata);
 $cart_mdata = $producthelper->getSpecialProductComment($manufacturer_products[$i], $cart_mdata);
 $product_id = $manufacturer_products[$i]->product_id;
 $childproduct = $producthelper->getChildProduct($product_id);
 if (count($childproduct) > 0) {
     $isChilds = true;
     $attributes = array();
 } else {
     $isChilds = false;
     // Get attributes
     $attributes_set = array();
     if ($manufacturer_products[$i]->attribute_set_id > 0) {
         $attributes_set = $producthelper->getProductAttribute(0, $manufacturer_products[$i]->attribute_set_id, 0, 1);
     }
     $attributes = $producthelper->getProductAttribute($product_id);
     $attributes = array_merge($attributes, $attributes_set);
 }
Exemplo n.º 2
0
    $template_desc = str_replace("{publish_date}", "", $template_desc);
}
/*
 * Conditional tag
 * if product on discount : Yes
 * {if product_on_sale} This product is on sale {product_on_sale end if} // OUTPUT : This product is on sale
 * NO : // OUTPUT : Display blank
 */
$template_desc = $producthelper->getProductOnSaleComment($this->data, $template_desc);
/*
 * Conditional tag
 * if product on discount : Yes
 * {if product_special} This is a special product {product_special end if} // OUTPUT : This is a special product
 * NO : // OUTPUT : Display blank
 */
$template_desc = $producthelper->getSpecialProductComment($this->data, $template_desc);
$manuUrl = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=detail&mid=' . $this->data->manufacturer_id . '&Itemid=' . $this->itemId);
$manufacturerLink = "<a href='" . $manuUrl . "'>" . JText::_("COM_REDSHOP_VIEW_MANUFACTURER") . "</a>";
$manuUrl = JRoute::_('index.php?option=com_redshop&view=manufacturers&layout=products&mid=' . $this->data->manufacturer_id . '&Itemid=' . $this->itemId);
$manufacturerPLink = "<a href='" . $manuUrl . "'>" . JText::_("COM_REDSHOP_VIEW_ALL_MANUFACTURER_PRODUCTS") . " " . $this->data->manufacturer_name . "</a>";
$template_desc = str_replace("{manufacturer_link}", $manufacturerLink, $template_desc);
$template_desc = str_replace("{manufacturer_product_link}", $manufacturerPLink, $template_desc);
$template_desc = str_replace("{manufacturer_name}", $this->data->manufacturer_name, $template_desc);
$template_desc = str_replace("{supplier_name}", "", $template_desc);
if (strstr($template_desc, "{product_delivery_time}")) {
    $product_delivery_time = $producthelper->getProductMinDeliveryTime($this->data->product_id);
    if ($product_delivery_time != "") {
        $template_desc = str_replace("{delivery_time_lbl}", JText::_('COM_REDSHOP_DELIVERY_TIME'), $template_desc);
        $template_desc = str_replace("{product_delivery_time}", $product_delivery_time, $template_desc);
    } else {
        $template_desc = str_replace("{delivery_time_lbl}", "", $template_desc);