本文整理汇总了PHP中producthelper::replaceAccessoryData方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::replaceAccessoryData方法的具体用法?PHP producthelper::replaceAccessoryData怎么用?PHP producthelper::replaceAccessoryData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类producthelper
的用法示例。
在下文中一共展示了producthelper::replaceAccessoryData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
} else {
$count_no_user_field = 0;
}
$childproduct = $producthelper->getChildProduct($this->data->product_id);
if (count($childproduct) > 0 && PURCHASE_PARENT_WITH_CHILD == 0) {
$isChilds = true;
} else {
$isChilds = false;
}
// Get attribute Template data
// Product attribute Start
$attributes_set = array();
if ($this->data->attribute_set_id > 0) {
$attributes_set = $producthelper->getProductAttribute(0, $this->data->attribute_set_id, 0, 1);
}
$attribute_template = $producthelper->getAttributeTemplate($data_add);
$attributes = $producthelper->getProductAttribute($this->data->product_id);
$attributes = array_merge($attributes, $attributes_set);
$totalatt = count($attributes);
$data_add = $producthelper->replaceAttributeData($this->data->product_id, 0, $relatedprd_id, $attributes, $data_add, $attribute_template, $isChilds, $selectAtt);
// Product attribute End
// Product accessory Start /////////////////////////////////
$accessory = $producthelper->getProductAccessory(0, $this->data->product_id);
$totalAccessory = count($accessory);
$data_add = $producthelper->replaceAccessoryData($this->data->product_id, $relatedprd_id, $accessory, $data_add, $isChilds, $selectAcc);
// Product accessory End /////////////////////////////////
// Cart
$data_add = $producthelper->replaceCartTemplate($this->data->product_id, $this->data->category_id, 0, $relatedprd_id, $data_add, $isChilds, $userfieldArr, $totalatt, $totalAccessory, $count_no_user_field);
$data_add = $data_add . "<input type='hidden' name='isAjaxBoxOpen' id='isAjaxBoxOpen' value='" . $layout . "' />";
echo eval("?>" . $data_add . "<?php ");
}
示例2: display_products
//.........这里部分代码省略.........
}
$wishlist_data = str_replace('{product_price}', $mainproduct_price, $wishlist_data);
}
// Product User Field Start
$count_no_user_field = 0;
$returnArr = $producthelper->getProductUserfieldFromTemplate($wishlist_data);
$template_userfield = $returnArr[0];
$userfieldArr = $returnArr[1];
if (strstr($wishlist_data, "{if product_userfield}") && strstr($wishlist_data, "{product_userfield end if}") && $template_userfield != "") {
$ufield = "";
$cart = $session->get('cart');
if (isset($cart['idx'])) {
$idx = (int) $cart['idx'];
}
$idx = 0;
$cart_id = '';
for ($j = 0; $j < $idx; $j++) {
if ($cart[$j]['product_id'] == $row->product_id) {
$cart_id = $j;
}
}
for ($ui = 0; $ui < count($userfieldArr); $ui++) {
if (!$idx) {
$cart_id = "";
}
$mysesspro = "productuserfield_" . $ui;
for ($check_i = 1; $check_i <= $_SESSION["no_of_prod"]; $check_i++) {
if ($_SESSION['wish_' . $check_i]->product_id == $row->product_id) {
$product_userfileds_final = $_SESSION['wish_' . $check_i]->{$mysesspro};
}
}
if ($product_userfileds_final != '') {
$product_userfileds = $extraField->list_all_user_fields($userfieldArr[$ui], 12, '', '', 0, $row->product_id, $product_userfileds_final, 1);
} else {
$product_userfileds = $extraField->list_all_user_fields($userfieldArr[$ui], 12, '', $cart_id, 0, $row->product_id);
}
$ufield .= $product_userfileds[1];
//
if ($product_userfileds[1] != "") {
$count_no_user_field++;
}
if ($product_userfileds_final != '') {
$wishlist_data = str_replace('{' . $userfieldArr[$ui] . '_lbl}', $product_userfileds[0], $wishlist_data);
$wishlist_data = str_replace('{' . $userfieldArr[$ui] . '}', $product_userfileds[1], $wishlist_data);
} else {
$wishlist_data = str_replace('{' . $userfieldArr[$ui] . '_lbl}', $product_userfileds[0], $wishlist_data);
$wishlist_data = str_replace('{' . $userfieldArr[$ui] . '}', $product_userfileds[1], $wishlist_data);
}
}
$product_userfileds_form = "<form method='post' action='' id='user_fields_form' name='user_fields_form'>";
if ($ufield != "") {
$wishlist_data = str_replace("{if product_userfield}", $product_userfileds_form, $wishlist_data);
$wishlist_data = str_replace("{product_userfield end if}", "</form>", $wishlist_data);
} else {
$wishlist_data = str_replace("{if product_userfield}", "", $wishlist_data);
$wishlist_data = str_replace("{product_userfield end if}", "", $wishlist_data);
}
}
// Product User Field End
/////////////////////////////////// Product accessory Start /////////////////////////////////
$accessory = $producthelper->getProductAccessory(0, $row->product_id);
$totalAccessory = count($accessory);
$wishlist_data = $producthelper->replaceAccessoryData($row->product_id, 0, $accessory, $wishlist_data, $isChilds);
/////////////////////////////////// Product accessory End /////////////////////////////////
$wishlist_data = str_replace('{product_name}', $pname, $wishlist_data);
$wishlist_data = str_replace('{product_number}', $pnumber, $wishlist_data);
$wishlist_data = str_replace('{product_s_desc}', $pdesc, $wishlist_data);
$wishlist_data = $producthelper->getExtraSectionTag($extraFieldName, $row->product_id, "1", $wishlist_data, 1);
$wishlist_data = $producthelper->replaceCartTemplate($row->product_id, $row->category_id, 0, 0, $wishlist_data, $isChilds, $userfieldArr, $totalatt, $totalAccessory, $count_no_user_field);
$rmore = "<a href='" . $link . "' title='" . $row->product_name . "'>" . JText::_('COM_REDSHOP_READ_MORE') . "</a>";
$wishlist_data = str_replace("{read_more}", $rmore, $wishlist_data);
$wishlist_data = str_replace("{read_more_link}", $link, $wishlist_data);
$wishlist_data = str_replace("{product_loop_start}", '', $wishlist_data);
$wishlist_data = str_replace("{product_loop_end}", '', $wishlist_data);
$wishlist_data = str_replace("{back_link}", '', $wishlist_data);
$wishlist_data = str_replace("{back_link}", '', $wishlist_data);
$wishlist_data = str_replace("{mail_link}", '', $wishlist_data);
$wishlist_data = str_replace("{if product_on_sale}", '', $wishlist_data);
$wishlist_data = str_replace("{product_on_sale end if}", '', $wishlist_data);
$wishlist_data = str_replace("<table></table>", '', $wishlist_data);
$wishlist_data = str_replace("{all_cart}", '', $wishlist_data);
$wishlist_data = str_replace("{if product_on_sale}", "", $wishlist_data);
$wishlist_data = str_replace("{product_on_sale end if}", "", $wishlist_data);
$regdellink = JRoute::_("index.php?mydel=1&view=wishlist&wishlist_id=" . $row->product_id . "&task=mysessdelwishlist");
$mainregdellink = "<div><a href=\"" . $regdellink . "\">" . JText::_('COM_REDSHOP_REMOVE_PRODUCT_FROM_WISHLIST') . "</a></div>";
$wishlist_data = str_replace('{remove_product_link}', $mainregdellink, $wishlist_data);
$mainid .= $row->product_id . ",";
$totattid .= $totalatt . ",";
$totcount_no_user_field .= $count_no_user_field . ",";
$temp_template .= $wishlist_data;
}
$my = "<form name='frm' method='POST' action=''>";
$my .= "<input type='hidden' name='product_id' id='product_id' value='" . $mainid . "' >\n\n\t\t\t<input type='hidden' name='totacc_id' id='totacc_id' value='" . $totattid . "' >\n\t\t\t<input type='hidden' name='totcount_no_user_field' id='totcount_no_user_field' value='" . $totcount_no_user_field . "' >\n\t\t\t<input type='button' name='submit' onclick='return productalladdprice();' value='" . JText::_('COM_REDSHOP_ADD_TO_CART') . "'>\n\t\t\t</form>";
$data = $template_d1[0] . $temp_template . $template_d2[1];
$data = str_replace('{back_link}', '', $data);
$data = str_replace('{all_cart}', $my, $data);
$data = $redTemplate->parseredSHOPplugin($data);
echo eval("?>" . $data . "<?php ");
}
}
示例3: count
$attributes = $producthelper->getProductAttribute($row->product_id);
$attributes = array_merge($attributes, $attributes_set);
}
$attribute_template = $producthelper->getAttributeTemplate($wishlist_data);
// Check product for not for sale
$wishlist_data = $producthelper->getProductNotForSaleComment($row, $wishlist_data, $attributes);
$wishlist_data = $producthelper->replaceProductInStock($row->product_id, $wishlist_data, $attributes, $attribute_template);
// Product attribute Start
$totalatt = count($attributes);
$wishlist_data = $producthelper->replaceAttributeData($row->product_id, 0, 0, $attributes, $wishlist_data, $attribute_template, $isChilds);
// Product attribute End
// Checking for child products end
// Product accessory Start
$accessory = $producthelper->getProductAccessory(0, $row->product_id);
$totalAccessory = count($accessory);
$wishlist_data = $producthelper->replaceAccessoryData($row->product_id, 0, $accessory, $wishlist_data, $isChilds);
// Product accessory End
// Product User Field Start
$count_no_user_field = 0;
$returnArr = $producthelper->getProductUserfieldFromTemplate($wishlist_data);
$template_userfield = $returnArr[0];
$userfieldArr = $returnArr[1];
if (strstr($wishlist_data, "{if product_userfield}") && strstr($wishlist_data, "{product_userfield end if}") && $template_userfield != "") {
$ufield = "";
$cart = $session->get('cart');
if (isset($cart['idx'])) {
$idx = (int) $cart['idx'];
}
$idx = 0;
$cart_id = '';
for ($j = 0; $j < $idx; $j++) {
示例4: strstr
}
} else {
$productAvailabilityDate = strstr($template_desc, "{product_availability_date}");
$stockNotifyFlag = strstr($template_desc, "{stock_notify_flag}");
$stockStatus = strstr($template_desc, "{stock_status");
if ($productAvailabilityDate || $stockNotifyFlag || $stockStatus) {
$attributeproductStockStatus = $producthelper->getproductStockStatus($this->data->product_id, $totalatt);
}
}
$template_desc = $producthelper->replaceProductStockdata($this->data->product_id, $selectedpropertyId, $selectedsubpropertyId, $template_desc, $attributeproductStockStatus);
$product_number_output = '<span id="product_number_variable' . $this->data->product_id . '">' . $pr_number . '</span>';
$template_desc = str_replace("{product_number}", $product_number_output, $template_desc);
// Product accessory Start
$accessory = $producthelper->getProductAccessory(0, $this->data->product_id);
$totalAccessory = count($accessory);
$template_desc = $producthelper->replaceAccessoryData($this->data->product_id, 0, $accessory, $template_desc, $isChilds);
// Product accessory End
if (strstr($template_desc, $mpimg_tag)) {
if ($moreimage_response != "") {
$more_images = $moreimage_response;
} else {
$media_image = $producthelper->getAdditionMediaImage($this->data->product_id, "product");
$more_images = '';
for ($m = 0; $m < count($media_image); $m++) {
$filename1 = REDSHOP_FRONT_IMAGES_RELPATH . "product/" . $media_image[$m]->media_name;
if ($media_image[$m]->media_name != $media_image[$m]->product_full_image && file_exists($filename1)) {
$alttext = $producthelper->getAltText('product', $media_image[$m]->section_id, '', $media_image[$m]->media_id);
if (!$alttext) {
$alttext = $media_image[$m]->media_name;
}
if ($media_image[$m]->media_name) {