• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpsc_the_variation_name函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wpsc_the_variation_name函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_the_variation_name函数的具体用法?PHP wpsc_the_variation_name怎么用?PHP wpsc_the_variation_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wpsc_the_variation_name函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: media_fields

 public static function media_fields($form_fields, $attachment)
 {
     if (!isset($_GET['post_id'])) {
         return $form_fields;
     }
     $product_id = $_GET['post_id'];
     if (!$attachment->post_parent) {
         return $form_fields;
     }
     $parent = get_post($attachment->post_parent);
     if ($parent->post_type !== 'wpsc-product') {
         return $form_fields;
     }
     $product_id = $parent->ID;
     if (isset($_GET['tab']) && $_GET['tab'] == 'gallery' && get_post_type($product_id) == 'wpsc-product' && class_exists('wpsc_variations') && wp_attachment_is_image($attachment->ID)) {
         global $wpsc_variations;
         $wpsc_variations = new wpsc_variations($product_id);
         if (wpsc_have_variation_groups()) {
             $form_fields['start_variation'] = array('label' => __('Variations', 'wpsc_dgallery'), 'input' => 'html', 'html' => '<style>.start_variation {border-width:2px 2px 0} .end_variation {border-width:0 2px 2px} .start_variation, .end_variation {border-style:solid ;border-color:#E6DB55;-webkit-border-radius:10px;-moz-border-radius:10px;-o-border-radius:10px; border-radius: 10px;position:relative;}</style>', 'value' => '', 'helps' => __('Upgrade to the PRO version to use this feature.', 'wpsc_dgallery'));
             while (wpsc_have_variation_groups()) {
                 wpsc_the_variation_group();
                 $html = "<style>.in_variations_" . wpsc_vargrp_id() . " {border-width:0 2px;border-style:solid ;border-color:#E6DB55;}</style>";
                 $html .= "<input disabled='disabled' type='checkbox' id='" . $attachment->ID . "_" . wpsc_vargrp_id() . "' name='" . $attachment->ID . "_" . wpsc_vargrp_id() . "' value=''> <label for='" . $attachment->ID . "_" . wpsc_vargrp_id() . "'><strong>" . __('Apply to All', 'wpsc_dgallery') . "</strong></label><br />";
                 while (wpsc_have_variations()) {
                     wpsc_the_variation();
                     if (wpsc_the_variation_id() > 0) {
                         $html .= "&nbsp;- &nbsp; <input disabled='disabled' type='checkbox' id='" . $attachment->ID . "_" . wpsc_vargrp_id() . "_" . wpsc_the_variation_id() . "'> <label for='" . $attachment->ID . "_" . wpsc_vargrp_id() . "_" . wpsc_the_variation_id() . "'>" . esc_html(wpsc_the_variation_name()) . "</label><br />";
                     }
                 }
                 $form_fields['in_variations_' . wpsc_vargrp_id()] = array('label' => esc_html(wpsc_the_vargrp_name()), 'input' => 'html', 'html' => $html, 'value' => '');
             }
             $form_fields['end_variation'] = array('label' => '', 'input' => 'html', 'html' => '&nbsp;', 'value' => '');
         }
     }
     return $form_fields;
 }
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:36,代码来源:class-wpsc-dynamic-gallery-variations.php


示例2: wpsc_vargrp_form_id

]" id="<?php 
        echo wpsc_vargrp_form_id();
        ?>
">
								<?php 
        while (wpsc_have_variations()) {
            wpsc_the_variation();
            ?>
									<option value="<?php 
            echo wpsc_the_variation_id();
            ?>
"  <?php 
            echo wpsc_the_variation_out_of_stock();
            ?>
 ><?php 
            echo wpsc_the_variation_name();
            ?>
</option>
								<?php 
        }
        ?>
								</select> 
							</p>
						<?php 
    }
    ?>
					</div>
					<?php 
    /** the variation group HTML and loop ends here */
    ?>
									
开发者ID:Jonathonbyrd,项目名称:wp-ecommerce,代码行数:30,代码来源:single_product.php


示例3: if

						<?php if(wpsc_product_external_link(wpsc_the_product_id()) != '') : ?>
							<?php	$action =  wpsc_product_external_link(wpsc_the_product_id()); ?>
						<?php else: ?>
							<?php	$action =  wpsc_this_page_url(); ?>						
						<?php endif; ?>
						<form class='product_form'  enctype="multipart/form-data" action="<?php echo $action; ?>" method="post" name="product_<?php echo wpsc_the_product_id(); ?>">

							<?php /** the variation group HTML and loop */?>
							<div class="wpsc_variation_forms">
								<?php while (wpsc_have_variation_groups()) : wpsc_the_variation_group(); ?>
									<p>
										<label for="<?php echo wpsc_vargrp_form_id(); ?>"><?php echo wpsc_the_vargrp_name(); ?>:</label>
										<?php /** the variation HTML and loop */?>
										<select class='wpsc_select_variation' name="variation[<?php echo wpsc_vargrp_id(); ?>]" id="<?php echo wpsc_vargrp_form_id(); ?>">
										<?php while (wpsc_have_variations()) : wpsc_the_variation(); ?>
											<option value="<?php echo wpsc_the_variation_id(); ?>"><?php echo wpsc_the_variation_name(); ?></option>
										<?php endwhile; ?>
										</select>
									</p>
								<?php endwhile; ?>
							</div>
							<?php /** the variation group HTML and loop ends here */?>




						
							<?php if(wpsc_has_multi_adding()): ?>
								<label class='wpsc_quantity_update' for='wpsc_quantity_update[<?php echo wpsc_the_product_id(); ?>]'><?php echo __('Quantity', 'wpsc'); ?>:</label>
+								<input type="text" id='wpsc_quantity_update[<?php echo wpsc_the_product_id(); ?>]' name="wpsc_quantity_update" size="2" value="1"/>
								<input type="hidden" name="key" value="<?php echo wpsc_the_cart_item_key(); ?>"/>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:31,代码来源:list_view.php


示例4: __

							<h4><?php echo __('Upload a File', 'wpsc'); ?></h4>
							<?php echo __('Select a file from your computer to include with this purchase.  ', 'wpsc'); ?><br />
							<input type='file' name='custom_file' value=''  />
						</div>
					<?php endif; ?>
					
					
					<?php /** the variation group HTML and loop */?>
					<div class="wpsc_variation_forms">
						<?php while (wpsc_have_variation_groups()) : wpsc_the_variation_group(); ?>
							<p>
								<label for="<?php echo wpsc_vargrp_form_id(); ?>"><?php echo wpsc_the_vargrp_name(); ?>:</label>
								<?php /** the variation HTML and loop */?>
								<select class='wpsc_select_variation' name="variation[<?php echo wpsc_vargrp_id(); ?>]" id="<?php echo wpsc_vargrp_form_id(); ?>">
								<?php while (wpsc_have_variations()) : wpsc_the_variation(); ?>
									<option value="<?php echo wpsc_the_variation_id(); ?>" <?php echo wpsc_the_variation_out_of_stock(); ?>><?php echo wpsc_the_variation_name(); ?></option>
								<?php endwhile; ?>
								</select> 
							</p>
						<?php endwhile; ?>
					</div>
					<?php /** the variation group HTML and loop ends here */?>
									
					
					<!-- THIS IS THE QUANTITY OPTION MUST BE ENABLED FROM ADMIN SETTINGS -->
					<?php if(wpsc_has_multi_adding()): ?>
						<fieldset>
						<label class='wpsc_quantity_update' for='wpsc_quantity_update[<?php echo wpsc_the_product_id(); ?>]'><?php echo __('Quantity', 'wpsc'); ?>:</label>
						
						<input type="text" id='wpsc_quantity_update' name="wpsc_quantity_update[<?php echo wpsc_the_product_id(); ?>]" size="2" value="1"/>
						<input type="hidden" name="key" value="<?php echo wpsc_the_cart_item_key(); ?>"/>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:31,代码来源:single_product.php


示例5: wpsc_add_to_cart_button

function wpsc_add_to_cart_button($product_id, $return = false)
{
    global $wpdb, $wpsc_variations;
    $output = '';
    if ($product_id > 0) {
        // grab the variation form fields here
        $wpsc_variations = new wpsc_variations($product_id);
        if ($return) {
            ob_start();
        }
        ?>
			<div class='wpsc-add-to-cart-button'>
				<form class='wpsc-add-to-cart-button-form' id='product_<?php 
        echo esc_attr($product_id);
        ?>
' action='' method='post'>
					<?php 
        do_action('wpsc_add_to_cart_button_form_begin');
        ?>
					<div class='wpsc_variation_forms'>
						<?php 
        while (wpsc_have_variation_groups()) {
            wpsc_the_variation_group();
            ?>
							<p>
								<label for='<?php 
            echo wpsc_vargrp_form_id();
            ?>
'><?php 
            echo esc_html(wpsc_the_vargrp_name());
            ?>
:</label>
								<select class='wpsc_select_variation' name='variation[<?php 
            echo wpsc_vargrp_id();
            ?>
]' id='<?php 
            echo wpsc_vargrp_form_id();
            ?>
'>
									<?php 
            while (wpsc_have_variations()) {
                wpsc_the_variation();
                ?>
										<option value='<?php 
                echo wpsc_the_variation_id();
                ?>
' <?php 
                echo wpsc_the_variation_out_of_stock();
                ?>
><?php 
                echo esc_html(wpsc_the_variation_name());
                ?>
</option>
									<?php 
            }
            ?>
								</select>
							</p>
						<?php 
        }
        ?>
					</div>
					<input type='hidden' name='wpsc_ajax_action' value='add_to_cart' />
					<input type='hidden' name='product_id' value='<?php 
        echo $product_id;
        ?>
' />
					<input type='submit' id='product_<?php 
        echo $product_id;
        ?>
_submit_button' class='wpsc_buy_button' name='Buy' value='<?php 
        echo __('Add To Cart', 'wpsc');
        ?>
'  />
					<?php 
        do_action('wpsc_add_to_cart_button_form_end');
        ?>
				</form>
			</div>
		<?php 
        if ($return) {
            return ob_get_clean();
        }
    }
}
开发者ID:arturo-mayorga,项目名称:am_com,代码行数:85,代码来源:display.functions.php


示例6: wpsc_add_to_cart_button

function wpsc_add_to_cart_button($product_id, $replaced_shortcode = false)
{
    global $wpdb, $wpsc_variations;
    if ($product_id > 0) {
        // grab the variation form fields here
        $wpsc_variations = new wpsc_variations($product_id);
        $output .= "<form onsubmit='submitform(this);return false;'  action='' method='post'>";
        /** the variation group HTML and loop */
        $output .= "<div class='wpsc_variation_forms'>";
        while (wpsc_have_variation_groups()) {
            wpsc_the_variation_group();
            $output .= "<p>";
            $output .= "<label for='" . wpsc_vargrp_form_id() . "'>" . wpsc_the_vargrp_name() . ":</label>";
            /** the variation HTML and loop */
            $output .= "<select class='wpsc_select_variation' name='variation[" . wpsc_vargrp_id() . "]' id='" . wpsc_vargrp_form_id() . "'>";
            while (wpsc_have_variations()) {
                wpsc_the_variation();
                $output .= "<option value='" . wpsc_the_variation_id() . "' " . wpsc_the_variation_out_of_stock() . ">" . wpsc_the_variation_name() . "</option>";
            }
            $output .= "</select> ";
            $output .= "</p>";
        }
        $output .= "</div>";
        /** the variation group HTML and loop ends here */
        $output .= "<input type='hidden' name='wpsc_ajax_action' value='add_to_cart' />";
        $output .= "<input type='hidden' name='product_id' value='" . $product_id . "' />";
        $output .= "<input type='hidden' name='item' value='" . $product_id . "' />";
        if (isset($wpsc_theme) && is_array($wpsc_theme) && $wpsc_theme['html'] != '') {
            $output .= $wpsc_theme['html'];
        } else {
            $output .= "<input type='submit' id='product_" . $product['id'] . "_submit_button' class='wpsc_buy_button' name='Buy' value='" . __('Add To Cart', 'wpsc') . "'  />";
        }
        $output .= '</form>';
        if ($replaced_shortcode == true) {
            return $output;
        } else {
            echo $output;
        }
    }
}
开发者ID:hornet9,项目名称:Morato,代码行数:40,代码来源:display.functions.php



注:本文中的wpsc_the_variation_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpsc_the_variation_out_of_stock函数代码示例发布时间:2022-05-23
下一篇:
PHP wpsc_the_variation_id函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap