コード例 #1
0
            echo __('This product has sold out.', 'wpsc');
            ?>
</p>
						<?php 
        }
        ?>
					<?php 
    }
    ?>
					</form>
					
					<?php 
    if (get_option('hide_addtocart_button') == 0 && get_option('addtocart_or_buynow') == '1') {
        ?>
						<?php 
        echo wpsc_buy_now_button(wpsc_the_product_id());
        ?>
					<?php 
    }
    ?>
					
					<?php 
    echo wpsc_product_rater();
    ?>
						
						
					<?php 
    if (function_exists('gold_shpcrt_display_gallery')) {
        echo gold_shpcrt_display_gallery(wpsc_the_product_id());
    }
    ?>
コード例 #2
0
ファイル: theme.functions.php プロジェクト: papayalabs/htdocs
function wpsc_substitute_buy_now_button($content = '')
{
    if (preg_match_all("/\\[buy_now_button=([\\d]+)\\]/", $content, $matches)) {
        //echo "<pre>".print_r($matches,true)."</pre>";
        foreach ($matches[1] as $key => $product_id) {
            $original_string = $matches[0][$key];
            //print_r($matches);
            $output = wpsc_buy_now_button($product_id, true);
            $content = str_replace($original_string, $output, $content);
        }
    }
    return $content;
}
コード例 #3
0
.prev').removeClass('disabled');
        jQuery('.arrow<?php 
            echo $rand;
            ?>
.next').removeClass('disabled');
      }
    });
  </script>
<?php 
        }
    }
    ?>
<div class="productcol">
  <?php 
    if (get_option('hide_addtocart_button') == 0 && get_option('addtocart_or_buynow') == '1') {
        echo wpsc_buy_now_button($product_id);
    }
    ?>

</div>
<!--close productcol-->

<form onsubmit="submitform(this);return false;" action="<?php 
    echo wpsc_this_page_url();
    ?>
" method="post"
      name="product_<?php 
    echo $product_id;
    ?>
" id="product_extra_<?php 
    echo $product_id;
コード例 #4
0
function wpsc_buy_now_shortcode($atts)
{
    $output = wpsc_buy_now_button($atts['product_id'], true);
    return $output;
}
コード例 #5
0
ファイル: tickets.php プロジェクト: TakenCdosG/chefs
 * @version 4.2
 *
 * @var bool $must_login
 */
ob_start();
$is_there_any_product = false;
$is_there_any_product_to_sell = false;
foreach ($tickets as $ticket) {
    if ($ticket->date_in_range(current_time('timestamp'))) {
        $is_there_any_product = true;
        echo '<tr>';
        echo "<td width='115' class='wpec quantity' data-product-id='" . esc_attr($ticket->ID) . "'>";
        if (wpsc_product_has_stock($ticket->ID)) {
            $is_there_any_product_to_sell = true;
            if (get_option('addtocart_or_buynow') == '1') {
                echo wpsc_buy_now_button($ticket->ID);
            } else {
                ?>
				<fieldset>
					<legend><?php 
                esc_html_e('Quantity', 'event-tickets-plus');
                ?>
</legend>
					<div class="wpsc_quantity_update">
						<input type="number" id="wpec_tickets_quantity_<?php 
                echo esc_attr($ticket->ID);
                ?>
" name="wpec_tickets_quantity[]" size="2" value="0" min="0" <?php 
                disabled($must_login);
                ?>
/>