| @@ -1,189 +1,205 @@ | ||
| 1 | -<?php | |
| 2 | -usces_the_item(); | |
| 3 | - | |
| 4 | -$html = '<div id="itempage">'."\n"; | |
| 5 | -$html .= '<form action="' . USCES_CART_URL . '" method="post">'."\n"; | |
| 6 | - | |
| 7 | -$html .= '<div class="itemimg">'."\n"; | |
| 8 | -$html .= '<a href="' . usces_the_itemImageURL(0, 'return') . '"'; | |
| 9 | -$html = apply_filters('usces_itemimg_anchor_rel', $html); | |
| 10 | -$html .= '>'; | |
| 11 | -$itemImage = usces_the_itemImage(0, 200, 250, $post, 'return'); | |
| 12 | -$html .= apply_filters('usces_filter_the_itemImage', $itemImage, $post); | |
| 13 | -$html .= '</a>'."\n"; | |
| 14 | -$html .= '</div>'."\n"; | |
| 15 | - | |
| 16 | -if(usces_sku_num() === 1) { //1SKU | |
| 17 | - usces_have_skus(); | |
| 18 | - | |
| 19 | - $html .= '<h3>' . esc_html(usces_the_itemName( 'return' )) . ' (' . esc_html(usces_the_itemCode( 'return' )) . ') </h3>'."\n"; | |
| 20 | - $html .= '<div class="exp clearfix">'."\n"; | |
| 21 | - $html .= '<div class="field">'."\n"; | |
| 22 | - if( usces_the_itemCprice('return') > 0 ){ | |
| 23 | - $usces_listprice = __('List price', 'usces') . usces_guid_tax('return'); | |
| 24 | - $html .= '<div class="field_name">' . apply_filters('usces_filter_listprice_label', $usces_listprice, __('List price', 'usces'), usces_guid_tax('return')) . '</div>'."\n"; | |
| 25 | - $html .= '<div class="field_cprice">' . usces_the_itemCpriceCr('return') . '</div>'; | |
| 26 | - } | |
| 27 | - $usces_sellingprice = __('selling price', 'usces') . usces_guid_tax('return'); | |
| 28 | - $html .= '<div class="field_name">' . apply_filters('usces_filter_sellingprice_label', $usces_sellingprice, __('selling price', 'usces'), usces_guid_tax('return')) . '</div>'."\n"; | |
| 29 | - $html .= '<div class="field_price">' . usces_the_itemPriceCr('return') . '</div>'."\n"; | |
| 30 | - $html .= '</div>'."\n"; | |
| 31 | - $singlestock = '<div class="field">' . __('stock status', 'usces') . ' : ' . esc_html(usces_get_itemZaiko( 'name' )) . '</div>'."\n"; | |
| 32 | - $html .= apply_filters('single_item_stock_field', $singlestock); | |
| 33 | - $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ); | |
| 34 | - if($item_custom){ | |
| 35 | - $html .= '<div class="field">'."\n"; | |
| 36 | - $html .= $item_custom; | |
| 37 | - $html .= '</div>'."\n"; | |
| 38 | - } | |
| 39 | - | |
| 40 | - $html .= $content."\n"; | |
| 41 | - $html .= '</div><!-- end of exp -->'."\n"; | |
| 42 | - $html .= usces_the_itemGpExp('return'); | |
| 43 | - $html .= '<div class="skuform" align="right">'."\n"; | |
| 44 | - if (usces_is_options()) { | |
| 45 | - $html .= "<table class='item_option'><caption>" . apply_filters('usces_filter_single_item_options_caption', __('Please appoint an option.', 'usces'), $post) . "</caption>\n"; | |
| 46 | - while (usces_have_options()) { | |
| 47 | - $opttr = "<tr><th>" . esc_html(usces_getItemOptName()) . '</th><td>' . usces_the_itemOption(usces_getItemOptName(),'','return') . "</td></tr>"; | |
| 48 | - $html .= apply_filters('usces_filter_singleitem_option', $opttr, usces_getItemOptName(), NULL) . "\n"; | |
| 49 | - } | |
| 50 | - $html .= "</table>\n"; | |
| 51 | - } | |
| 52 | - if( !usces_have_zaiko() ){ | |
| 53 | - $html .= '<div class="zaiko_status">' . apply_filters('usces_filters_single_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))) . '</div>'."\n"; | |
| 54 | - }else{ | |
| 55 | - $html .= '<div style="margin-top:10px">'.__('Quantity', 'usces').usces_the_itemQuant('return') . esc_html(usces_the_itemSkuUnit('return')) . usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0, 'return') . '</div>'."\n"; | |
| 56 | - $html .= '<div class="error_message">' . usces_singleitem_error_message($post->ID, usces_the_itemSku('return'), 'return') . '</div>'."\n"; | |
| 57 | - } | |
| 58 | - | |
| 59 | - $html .= '</div><!-- end of skuform -->'."\n"; | |
| 60 | - $html .= apply_filters('single_item_single_sku_after_field', NULL); | |
| 61 | - | |
| 62 | -} elseif(usces_sku_num() > 1) { //some SKU | |
| 63 | - usces_have_skus(); | |
| 64 | - $html .= '<h3>' . usces_the_itemName( 'return' ) . ' (' . usces_the_itemCode( 'return' ) . ') </h3>'."\n"; | |
| 65 | - $html .= '<div class="exp clearfix">'."\n"; | |
| 66 | - $html .= $content."\n"; | |
| 67 | - $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ); | |
| 68 | - if($item_custom){ | |
| 69 | - $html .= '<div class="field">'."\n"; | |
| 70 | - $html .= $item_custom; | |
| 71 | - $html .= '</div>'."\n"; | |
| 72 | - } | |
| 73 | - $html .= '</div>'."\n"; | |
| 74 | - | |
| 75 | - $html .= '<div class="skuform">'."\n"; | |
| 76 | - $html .= '<table class="skumulti">'."\n"; | |
| 77 | - $html .= '<thead>'."\n"; | |
| 78 | - $html .= '<tr>'."\n"; | |
| 79 | - $html .= '<th rowspan="2" class="thborder">'.__('order number', 'usces').'</th>'."\n"; | |
| 80 | - $html .= '<th colspan="2">'.__('Title', 'usces').'</th>'."\n"; | |
| 81 | - if( usces_the_itemCprice('return') > 0 ){ | |
| 82 | - $usces_bothprice = '('.__('List price', 'usces').')'.__('selling price', 'usces') . usces_guid_tax('return'); | |
| 83 | - $html .= '<th colspan="2">'.apply_filters('usces_filter_bothprice_label', $usces_bothprice, __('List price', 'usces'), __('selling price', 'usces'), usces_guid_tax('return')) . '</th>'."\n"; | |
| 84 | - }else{ | |
| 85 | - $usces_sellingprice = __('selling price', 'usces') . usces_guid_tax('return'); | |
| 86 | - $html .= '<th colspan="2">'.apply_filters('usces_filter_sellingprice_label', $usces_sellingprice, __('selling price', 'usces'), usces_guid_tax('return')) . '</th>'."\n"; | |
| 87 | - } | |
| 88 | - $html .= '</tr>'."\n"; | |
| 89 | - $html .= '<tr>'."\n"; | |
| 90 | - $html .= '<th class="thborder">'.__('stock status', 'usces').'</th>'."\n"; | |
| 91 | - $html .= '<th class="thborder">'.__('Quantity', 'usces').'</th>'."\n"; | |
| 92 | - $html .= '<th class="thborder">'.__('unit', 'usces').'</th>'."\n"; | |
| 93 | - $html .= '<th class="thborder"> </th>'."\n"; | |
| 94 | - $html .= '</tr>'."\n"; | |
| 95 | - $html .= '</thead>'."\n"; | |
| 96 | - $html .= '<tbody>'."\n"; | |
| 97 | - do { | |
| 98 | - $html .= '<tr>'."\n"; | |
| 99 | - $html .= '<td rowspan="2">' . esc_html(usces_the_itemSku('return')) . '</td>'."\n"; | |
| 100 | - $html .= '<td colspan="2" class="skudisp subborder">' . apply_filters('usces_filter_singleitem_skudisp', esc_html(usces_the_itemSkuDisp('return')))."\n"; | |
| 101 | - if (usces_is_options()) { | |
| 102 | - $html .= "<table class='item_option'><caption>" . apply_filters('usces_filter_single_item_options_caption', __('Please appoint an option.', 'usces'), $post) . "</caption>\n"; | |
| 103 | - while (usces_have_options()) { | |
| 104 | - $opttr = "<tr><th>" . esc_html(usces_getItemOptName()) . '</th><td>' . usces_the_itemOption(usces_getItemOptName(),'','return') . "</td></tr>"; | |
| 105 | - $html .= apply_filters('usces_filter_singleitem_option', $opttr, usces_getItemOptName(), NULL) . "\n"; | |
| 106 | - } | |
| 107 | - $html .= "</table>\n"; | |
| 108 | -// while (usces_have_options()) { | |
| 109 | -// $html .= '<br />' . usces_the_itemOption(usces_getItemOptName(),'', 'return'); | |
| 110 | -// } | |
| 111 | - } | |
| 112 | - $html .= '</td>'."\n"; | |
| 113 | - $html .= '<td colspan="2" class="subborder price">'."\n"; | |
| 114 | - if( usces_the_itemCprice('return') > 0 ){ | |
| 115 | - $html .= '<span class="cprice">(' . usces_the_itemCpriceCr('return') . ')</span>'."\n"; | |
| 116 | - } | |
| 117 | - $html .= '<span class="price">' . usces_the_itemPriceCr('return') . '</span><br />' . usces_the_itemGpExp('return') . '</td>'."\n"; | |
| 118 | - $html .= '</tr>'."\n"; | |
| 119 | - $html .= '<tr>'."\n"; | |
| 120 | - $html .= '<td class="zaiko">' . usces_get_itemZaiko( 'name' ) . '</td>'."\n"; | |
| 121 | - $html .= '<td class="quant">' . usces_the_itemQuant('return') . '</td>'."\n"; | |
| 122 | - $html .= '<td class="unit">' . usces_the_itemSkuUnit('return') . '</td>'."\n"; | |
| 123 | - if( !usces_have_zaiko() ){ | |
| 124 | - $html .= '<td class="button">' . apply_filters('usces_filters_single_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))) . '</td>'."\n"; | |
| 125 | - }else{ | |
| 126 | - $html .= '<td class="button">' . usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0, 'return') . '</td>'."\n"; | |
| 127 | - } | |
| 128 | - $html .= '</tr>'."\n"; | |
| 129 | - $html .= '<tr><td colspan="5" class="error_message">' . usces_singleitem_error_message($post->ID, usces_the_itemSku('return'), 'return') . '</td></tr>'."\n"; | |
| 130 | - | |
| 131 | - } while (usces_have_skus()); | |
| 132 | - $html .= '</tbody>'."\n"; | |
| 133 | - $html .= '</table>'."\n"; | |
| 134 | - $html .= '</div><!-- end of skuform -->'."\n"; | |
| 135 | - $html .= apply_filters('single_item_multi_sku_after_field', NULL); | |
| 136 | -} | |
| 137 | - | |
| 138 | -$html .= '<div class="itemsubimg">'."\n"; | |
| 139 | -$imageid = usces_get_itemSubImageNums(); | |
| 140 | -foreach ( $imageid as $id ) { | |
| 141 | - $html .= '<a href="' . usces_the_itemImageURL($id, 'return') . '"'; | |
| 142 | - $html = apply_filters('usces_itemimg_anchor_rel', $html); | |
| 143 | - $html .= '>'; | |
| 144 | - $itemImage = usces_the_itemImage($id, 137, 200, $post, 'return'); | |
| 145 | - $html .= apply_filters('usces_filter_the_SubImage', $itemImage, $post, $id); | |
| 146 | - $html .= '</a>'."\n"; | |
| 147 | -} | |
| 148 | -$html .= '</div><!-- end of itemsubimg -->'."\n"; | |
| 149 | - | |
| 150 | -if (usces_get_assistance_id_list($post->ID)) { | |
| 151 | - $org_opst = $post; | |
| 152 | - $html .= '<div class="assistance_item">'."\n"; | |
| 153 | - $assistanceposts = get_posts('include='.usces_get_assistance_id_list($post->ID)); | |
| 154 | - if ($assistanceposts) { | |
| 155 | - $assistance_item_title = '<h3>' . usces_the_itemCode( 'return' ) . __('An article concerned', 'usces').'</h3>'."\n"; | |
| 156 | - $html .= apply_filters('usces_assistance_item_title', $assistance_item_title); | |
| 157 | - $html .= '<ul class="clearfix">'."\n"; | |
| 158 | - foreach ($assistanceposts as $post) { | |
| 159 | - setup_postdata($post); | |
| 160 | - usces_the_item(); | |
| 161 | - $html .= '<li><div class="listbox clearfix">'."\n"; | |
| 162 | - $html .= '<div class="slit"><a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . esc_attr($post->post_title) . '">' . usces_the_itemImage(0, 100, 100, $post, 'return') . '</a></div>'."\n"; | |
| 163 | - $html .= '<div class="detail">'."\n"; | |
| 164 | - $html .= '<h4>' . usces_the_itemName('return') . '</h4>'."\n"; | |
| 165 | - $html .= $post->post_excerpt; | |
| 166 | - $html .= '<p>'."\n"; | |
| 167 | - if (usces_is_skus()) { | |
| 168 | - $html .= __('$', 'usces') . usces_the_firstPrice('return'); | |
| 169 | - } | |
| 170 | - $html .= '<br />'."\n"; | |
| 171 | - $html .= '» <a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . esc_attr($post->post_title) . '">'.__('see the details', 'usces').'</a></p>'."\n"; | |
| 172 | - $html .= '</div>'."\n"; | |
| 173 | - $html .= '</div>'."\n"; | |
| 174 | - $html .= '</li>'."\n"; | |
| 175 | - } | |
| 176 | - $html .= '</ul>'."\n"; | |
| 177 | - } | |
| 178 | - | |
| 179 | - $html .= '</div><!-- end of assistance_item -->'."\n"; | |
| 180 | - $post = $org_opst; | |
| 181 | - setup_postdata($post); | |
| 182 | -} | |
| 183 | - | |
| 184 | -$html = apply_filters('usces_filter_single_item_inform', $html); | |
| 185 | -$html .= '</form>'."\n"; | |
| 186 | -$html .= apply_filters('usces_filter_single_item_outform', NULL); | |
| 187 | - | |
| 188 | -$html .= '</div><!-- end of itemspage -->'."\n"; | |
| 189 | -?> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Single item page template | |
| 4 | + * | |
| 5 | + * @package Welcart | |
| 6 | + */ | |
| 7 | + | |
| 8 | +usces_the_item(); | |
| 9 | + | |
| 10 | +$html = '<div id="itempage">'; | |
| 11 | +$html .= '<form action="' . esc_url( USCES_CART_URL ) . '" method="post">'; | |
| 12 | + | |
| 13 | +$html .= '<div class="itemimg">'; | |
| 14 | +$html .= '<a href="' . usces_the_itemImageURL( 0, 'return' ) . '"'; | |
| 15 | +$html .= apply_filters( 'usces_itemimg_anchor_rel', '' ); | |
| 16 | +$html .= '>'; | |
| 17 | +$item_image = usces_the_itemImage( 0, 200, 250, $post, 'return' ); | |
| 18 | +$html .= apply_filters( 'usces_filter_the_itemImage', $item_image, $post ); | |
| 19 | +$html .= '</a>'; | |
| 20 | +$html .= '</div>'; | |
| 21 | + | |
| 22 | +if ( 1 === usces_sku_num() ) { | |
| 23 | + usces_have_skus(); | |
| 24 | + | |
| 25 | + $html .= '<h3>' . esc_html( usces_the_itemName( 'return' ) ) . ' (' . esc_html( usces_the_itemCode( 'return' ) ) . ') </h3>'; | |
| 26 | + $html .= '<div class="exp clearfix">'; | |
| 27 | + $html .= '<div class="field">'; | |
| 28 | + if ( 0 < usces_the_itemCprice( 'return' ) ) { | |
| 29 | + $usces_listprice = esc_html__( 'List price', 'usces' ) . usces_guid_tax( 'return' ); | |
| 30 | + $html .= '<div class="field_name">' . apply_filters( 'usces_filter_listprice_label', $usces_listprice, esc_html__( 'List price', 'usces' ), usces_guid_tax( 'return' ) ) . '</div>'; | |
| 31 | + $html .= '<div class="field_cprice">' . usces_the_itemCpriceCr( 'return' ) . '</div>'; | |
| 32 | + } | |
| 33 | + $usces_sellingprice = esc_html__( 'selling price', 'usces' ) . usces_guid_tax( 'return' ); | |
| 34 | + $html .= '<div class="field_name">' . apply_filters( 'usces_filter_sellingprice_label', $usces_sellingprice, esc_html__( 'selling price', 'usces' ), usces_guid_tax( 'return' ) ) . '</div>'; | |
| 35 | + $html .= '<div class="field_price">' . usces_the_itemPriceCr( 'return' ) . '</div>'; | |
| 36 | + $html .= usces_crform_the_itemPriceCr_taxincluded( true, '', '', '', true, false, true, 'return' ); | |
| 37 | + $html .= '</div>'; | |
| 38 | + $singlestock = '<div class="field">' . esc_html__( 'stock status', 'usces' ) . ' : ' . esc_html( usces_get_itemZaiko( 'name' ) ) . '</div>'; | |
| 39 | + $html .= apply_filters( 'single_item_stock_field', $singlestock ); | |
| 40 | + $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ); | |
| 41 | + if ( $item_custom ) { | |
| 42 | + $html .= '<div class="field">'; | |
| 43 | + $html .= $item_custom; | |
| 44 | + $html .= '</div>'; | |
| 45 | + } | |
| 46 | + | |
| 47 | + $html .= $content; | |
| 48 | + $html .= '</div><!-- end of exp -->'; | |
| 49 | + $html .= usces_the_itemGpExp( 'return' ); | |
| 50 | + $html .= '<div class="skuform" align="right">'; | |
| 51 | + if ( usces_is_options() ) { | |
| 52 | + $html .= '<table class="item_option"><caption>' . apply_filters( 'usces_filter_single_item_options_caption', esc_html__( 'Please appoint an option.', 'usces' ), $post ) . '</caption>'; | |
| 53 | + while ( usces_have_options() ) { | |
| 54 | + $opttr = '<tr><th>' . esc_html( usces_getItemOptName() ) . '</th><td>' . usces_the_itemOption( usces_getItemOptName(), '', 'return' ) . '</td></tr>'; | |
| 55 | + $html .= apply_filters( 'usces_filter_singleitem_option', $opttr, usces_getItemOptName(), null ); | |
| 56 | + } | |
| 57 | + $html .= '</table>'; | |
| 58 | + } | |
| 59 | + if ( ! usces_have_zaiko() ) { | |
| 60 | + $html .= '<div class="zaiko_status">' . apply_filters( 'usces_filters_single_sku_zaiko_message', esc_html( usces_get_itemZaiko( 'name' ) ) ) . '</div>'; | |
| 61 | + } else { | |
| 62 | + $html .= '<div style="margin-top:10px">' . esc_html__( 'Quantity', 'usces' ) . usces_the_itemQuant( 'return' ) . esc_html( usces_the_itemSkuUnit( 'return' ) ) . usces_the_itemSkuButton( esc_html__( 'Add to Shopping Cart', 'usces' ), 0, 'return' ) . '</div>'; | |
| 63 | + $html .= '<div class="error_message">' . usces_singleitem_error_message( $post->ID, usces_the_itemSku( 'return' ), 'return' ) . '</div>'; | |
| 64 | + } | |
| 65 | + | |
| 66 | + $html .= '</div><!-- end of skuform -->'; | |
| 67 | + $html .= apply_filters( 'single_item_single_sku_after_field', null ); | |
| 68 | + | |
| 69 | +} elseif ( 1 < usces_sku_num() ) { | |
| 70 | + usces_have_skus(); | |
| 71 | + | |
| 72 | + $html .= '<h3>' . esc_html( usces_the_itemName( 'return' ) ) . ' (' . esc_html( usces_the_itemCode( 'return' ) ) . ') </h3>'; | |
| 73 | + $html .= '<div class="exp clearfix">'; | |
| 74 | + $html .= $content; | |
| 75 | + $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ); | |
| 76 | + if ( $item_custom ) { | |
| 77 | + $html .= '<div class="field">'; | |
| 78 | + $html .= $item_custom; | |
| 79 | + $html .= '</div>'; | |
| 80 | + } | |
| 81 | + $html .= '</div>'; | |
| 82 | + | |
| 83 | + $html .= '<div class="skuform">'; | |
| 84 | + $html .= '<table class="skumulti">'; | |
| 85 | + $html .= '<thead>'; | |
| 86 | + $html .= '<tr>'; | |
| 87 | + $html .= '<th rowspan="2" class="thborder">' . esc_html__( 'order number', 'usces' ) . '</th>'; | |
| 88 | + $html .= '<th colspan="2">' . esc_html__( 'Title', 'usces' ) . '</th>'; | |
| 89 | + if ( 0 < usces_the_itemCprice( 'return' ) ) { | |
| 90 | + $usces_bothprice = '(' . esc_html__( 'List price', 'usces' ) . ')' . esc_html__( 'selling price', 'usces' ) . usces_guid_tax( 'return' ); | |
| 91 | + $html .= '<th colspan="2">' . apply_filters( 'usces_filter_bothprice_label', $usces_bothprice, esc_html__( 'List price', 'usces' ), esc_html__( 'selling price', 'usces' ), usces_guid_tax( 'return' ) ) . '</th>'; | |
| 92 | + } else { | |
| 93 | + $usces_sellingprice = esc_html__( 'selling price', 'usces' ) . usces_guid_tax( 'return' ); | |
| 94 | + $html .= '<th colspan="2">' . apply_filters( 'usces_filter_sellingprice_label', $usces_sellingprice, esc_html__( 'selling price', 'usces' ), usces_guid_tax( 'return' ) ) . '</th>'; | |
| 95 | + } | |
| 96 | + $html .= '</tr>'; | |
| 97 | + $html .= '<tr>'; | |
| 98 | + $html .= '<th class="thborder">' . esc_html__( 'stock status', 'usces' ) . '</th>'; | |
| 99 | + $html .= '<th class="thborder">' . esc_html__( 'Quantity', 'usces' ) . '</th>'; | |
| 100 | + $html .= '<th class="thborder">' . esc_html__( 'unit', 'usces' ) . '</th>'; | |
| 101 | + $html .= '<th class="thborder"> </th>'; | |
| 102 | + $html .= '</tr>'; | |
| 103 | + $html .= '</thead>'; | |
| 104 | + $html .= '<tbody>'; | |
| 105 | + do { | |
| 106 | + $html .= '<tr>'; | |
| 107 | + $html .= '<td rowspan="2">' . esc_html( usces_the_itemSku( 'return' ) ) . '</td>'; | |
| 108 | + $html .= '<td colspan="2" class="skudisp subborder">' . apply_filters( 'usces_filter_singleitem_skudisp', esc_html( usces_the_itemSkuDisp( 'return' ) ) ); | |
| 109 | + if ( usces_is_options() ) { | |
| 110 | + $html .= '<table class="item_option"><caption>' . apply_filters( 'usces_filter_single_item_options_caption', esc_html__( 'Please appoint an option.', 'usces' ), $post ) . '</caption>'; | |
| 111 | + while ( usces_have_options() ) { | |
| 112 | + $opttr = '<tr><th>' . esc_html( usces_getItemOptName() ) . '</th><td>' . usces_the_itemOption( usces_getItemOptName(), '', 'return' ) . '</td></tr>'; | |
| 113 | + $html .= apply_filters( 'usces_filter_singleitem_option', $opttr, usces_getItemOptName(), null ); | |
| 114 | + } | |
| 115 | + $html .= '</table>'; | |
| 116 | + } | |
| 117 | + $html .= '</td>'; | |
| 118 | + $html .= '<td colspan="2" class="subborder price">'; | |
| 119 | + if ( 0 < usces_the_itemCprice( 'return' ) ) { | |
| 120 | + $html .= '<span class="cprice">(' . usces_the_itemCpriceCr( 'return' ) . ')</span>'; | |
| 121 | + } | |
| 122 | + $html .= '<span class="price">' . usces_the_itemPriceCr( 'return' ) . '</span>'; | |
| 123 | + $html .= usces_crform_the_itemPriceCr_taxincluded( true, '', '', '', true, false, true, 'return' ); | |
| 124 | + $html .= '<br />' . usces_the_itemGpExp( 'return' ) . '</td>'; | |
| 125 | + $html .= '</tr>'; | |
| 126 | + $html .= '<tr>'; | |
| 127 | + $html .= '<td class="zaiko">' . usces_get_itemZaiko( 'name' ) . '</td>'; | |
| 128 | + $html .= '<td class="quant">' . usces_the_itemQuant( 'return' ) . '</td>'; | |
| 129 | + $html .= '<td class="unit">' . usces_the_itemSkuUnit( 'return' ) . '</td>'; | |
| 130 | + if ( ! usces_have_zaiko() ) { | |
| 131 | + $html .= '<td class="button">' . apply_filters( 'usces_filters_single_sku_zaiko_message', esc_html( usces_get_itemZaiko( 'name' ) ) ) . '</td>'; | |
| 132 | + } else { | |
| 133 | + $html .= '<td class="button">' . usces_the_itemSkuButton( esc_html__( 'Add to Shopping Cart', 'usces' ), 0, 'return' ) . '</td>'; | |
| 134 | + } | |
| 135 | + $html .= '</tr>'; | |
| 136 | + $html .= '<tr><td colspan="5" class="error_message">' . usces_singleitem_error_message( $post->ID, usces_the_itemSku( 'return' ), 'return' ) . '</td></tr>'; | |
| 137 | + | |
| 138 | + } while ( usces_have_skus() ); | |
| 139 | + $html .= '</tbody>'; | |
| 140 | + $html .= '</table>'; | |
| 141 | + $html .= '</div><!-- end of skuform -->'; | |
| 142 | + $html .= apply_filters( 'single_item_multi_sku_after_field', null ); | |
| 143 | +} | |
| 144 | + | |
| 145 | +$html .= '<div class="itemsubimg">'; | |
| 146 | +$imageid = usces_get_itemSubImageNums(); | |
| 147 | +foreach ( $imageid as $id ) { | |
| 148 | + $html .= '<a href="' . usces_the_itemImageURL( $id, 'return' ) . '"'; | |
| 149 | + $html .= apply_filters( 'usces_itemimg_anchor_rel', '' ); | |
| 150 | + $html .= '>'; | |
| 151 | + $item_image = usces_the_itemImage( $id, 137, 200, $post, 'return' ); | |
| 152 | + $html .= apply_filters( 'usces_filter_the_SubImage', $item_image, $post, $id ); | |
| 153 | + $html .= '</a>'; | |
| 154 | +} | |
| 155 | +$html .= '</div><!-- end of itemsubimg -->'; | |
| 156 | + | |
| 157 | +if ( usces_get_assistance_id_list( $post->ID ) ) { | |
| 158 | + $post_id = $post->ID; | |
| 159 | + | |
| 160 | + $html .= '<div class="assistance_item">'; | |
| 161 | + | |
| 162 | + $r = new WP_Query( array( 'post__in' => usces_get_assistance_ids( $post_id ), 'ignore_sticky_posts' => 1 ) ); | |
| 163 | + if ( $r->have_posts() ) { | |
| 164 | + add_filter( 'excerpt_length', 'welcart_assistance_excerpt_length' ); | |
| 165 | + add_filter( 'excerpt_mblength', 'welcart_assistance_excerpt_mblength' ); | |
| 166 | + $width = apply_filters( 'usces_filter_assistance_item_width', 100 ); | |
| 167 | + $height = apply_filters( 'usces_filter_assistance_item_height', 100 ); | |
| 168 | + | |
| 169 | + $assistance_item_title = '<h3>' . esc_html( usces_the_itemCode( 'return' ) ) . esc_html__( 'An article concerned', 'usces' ) . '</h3>'; | |
| 170 | + $html .= apply_filters( 'usces_assistance_item_title', $assistance_item_title ); | |
| 171 | + $html .= '<ul class="clearfix">'; | |
| 172 | + while ( $r->have_posts() ) { | |
| 173 | + $r->the_post(); | |
| 174 | + usces_remove_filter(); | |
| 175 | + usces_the_item(); | |
| 176 | + $html .= '<li><div class="listbox clearfix">'; | |
| 177 | + $html .= '<div class="slit"><a href="' . get_permalink() . '" rel="bookmark" title="' . esc_attr( get_the_title() ) . '">' . usces_the_itemImage( 0, $width, $height, $post, 'return' ) . '</a></div>'; | |
| 178 | + $html .= '<div class="detail">'; | |
| 179 | + $html .= '<h4>' . esc_html( usces_the_itemName( 'return' ) ) . '</h4>'; | |
| 180 | + $html .= get_the_excerpt(); | |
| 181 | + $html .= '<p>'; | |
| 182 | + if ( usces_is_skus() ) { | |
| 183 | + $html .= usces_crform( usces_the_firstPrice( 'return' ), true, false, 'return' ); | |
| 184 | + } | |
| 185 | + $html .= '<br />'; | |
| 186 | + $html .= '» <a href="' . get_permalink() . '" rel="bookmark" title="' . esc_attr( get_the_title() ) . '">' . esc_html__( 'see the details', 'usces' ) . '</a></p>'; | |
| 187 | + $html .= '</div>'; | |
| 188 | + $html .= '</div>'; | |
| 189 | + $html .= '</li>'; | |
| 190 | + } | |
| 191 | + $html .= '</ul>'; | |
| 192 | + wp_reset_postdata(); | |
| 193 | + usces_reset_filter(); | |
| 194 | + remove_filter( 'excerpt_length', 'welcart_assistance_excerpt_length' ); | |
| 195 | + remove_filter( 'excerpt_mblength', 'welcart_assistance_excerpt_mblength' ); | |
| 196 | + } | |
| 197 | + $html .= '</div><!-- end of assistance_item -->'; | |
| 198 | +} | |
| 199 | + | |
| 200 | +$html = apply_filters( 'usces_filter_single_item_inform', $html ); | |
| 201 | +$html .= '</form>'; | |
| 202 | +$html .= apply_filters( 'usces_filter_single_item_outform', null ); | |
| 203 | + | |
| 204 | +$html .= '</div><!-- end of itemspage -->'; | |
| 205 | +$html = apply_filters( 'usces_filter_single_item', $html, $post, $content ); | |