当前位置: 首页>>代码示例>>PHP>>正文


PHP shopp函数代码示例

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


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

示例1: widget

 function widget($args, $options)
 {
     extract($args);
     $title = $before_title . $options['title'] . $after_title;
     unset($options['title']);
     $menu = shopp('catalog', 'get-category-list', $options);
     echo $before_widget . $title . $menu . $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:8,代码来源:categories.php

示例2: george_display_shopp_cart_count

function george_display_shopp_cart_count($url)
{
    $count = 0;
    if (shopp('cart', 'hasitems')) {
        while (shopp('cart', 'items')) {
            $count++;
        }
    }
    return '<a href="' . $url . '">Shopping Cart (' . $count . ')</a>';
}
开发者ID:patrickingle,项目名称:george-page-name-id-retrieval,代码行数:10,代码来源:george.php

示例3: widget

 function widget($args, $options)
 {
     $Shopp = Shopp::object();
     extract($args);
     $title = $before_title . $options['title'] . $after_title;
     unset($options['title']);
     $content = shopp('storefront', 'get-sideproduct', $options);
     if (empty($content)) {
         return false;
     }
     echo $before_widget . $title . $content . $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:12,代码来源:product.php

示例4: widget

 function widget($args, $options)
 {
     $Shopp = Shopp::object();
     extract($args);
     $title = $before_title . $options['title'] . $after_title;
     unset($options['title']);
     if (empty(ShoppCollection()->id)) {
         return false;
     }
     $menu = shopp(ShoppCollection(), 'get-section-list', $options);
     echo $before_widget . $title . $menu . $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:12,代码来源:section.php

示例5: widget

 function widget($args, $options)
 {
     $Shopp = Shopp::object();
     if (!empty($args)) {
         extract($args);
     }
     if (empty($options['title'])) {
         $options['title'] = "Product Tags";
     }
     $title = $before_title . $options['title'] . $after_title;
     $tagcloud = shopp('catalog', 'get-tagcloud', $options);
     echo $before_widget . $title . $tagcloud . $after_widget;
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:13,代码来源:tagcloud.php

示例6: widget

 function widget($args, $options)
 {
     $Shopp = Shopp::object();
     if (!empty($args)) {
         extract($args);
     }
     if (empty($options['title'])) {
         $options['title'] = __('Shop Search', 'Shopp');
     }
     $title = $before_title . $options['title'] . $after_title;
     $content = shopp('catalog', 'get-searchform');
     echo $before_widget . $title . $content . $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:13,代码来源:search.php

示例7: widget

 function widget($args, $options)
 {
     if (!empty($args)) {
         extract($args);
     }
     if (empty($options['title'])) {
         $options['title'] = __('Recent Shoppers', 'Shopp');
     }
     $title = $before_title . $options['title'] . $after_title;
     $content = shopp('catalog', 'get-recent-shoppers', $options);
     if (empty($content)) {
         return false;
     }
     // No recent shoppers, hide it
     echo $before_widget . $title . $content . $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:16,代码来源:shoppers.php

示例8: widget

 /**
  * Display the widget content
  *
  * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
  * @param array $options The settings for the particular instance of the widget
  */
 function widget($args, $options)
 {
     if (!empty($args)) {
         extract($args);
     }
     if (empty($options['title'])) {
         $options['title'] = __('Product Filters', 'Shopp');
     }
     $title = $before_title . $options['title'] . $after_title;
     $Collection = ShoppCollection();
     if (empty($Collection)) {
         return;
     }
     if ('' != shopp('collection.get-id') && shopp('collection.has-faceted-menu')) {
         $menu = shopp('collection.get-faceted-menu', $options);
         echo $before_widget . $title . $menu . $after_widget;
     }
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:24,代码来源:facetedmenu.php

示例9: widget

 function widget($args, $options)
 {
     if (!empty($args)) {
         extract($args);
     }
     if (empty($options['title'])) {
         $options['title'] = __('Your Cart', 'Shopp');
     }
     $title = $before_title . $options['title'] . $after_title;
     if ('on' == $options['hide-empty'] && shopp_cart_items_count() == 0) {
         return;
     }
     $sidecart = shopp('cart', 'get-sidecart', $options);
     if (empty($sidecart)) {
         return;
     }
     echo $before_widget . $title . $sidecart . $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:18,代码来源:cart.php

示例10: instructions

 /**
  * Adds shopp('checkout.offlineinstructions') Theme API support
  *
  * @author Jonathan Davis
  * @since 1.1
  *
  * @return void
  **/
 public function instructions($result, $options)
 {
     add_filter('shopp_offline_payment_instructions', 'stripslashes');
     add_filter('shopp_offline_payment_instructions', 'wptexturize');
     add_filter('shopp_offline_payment_instructions', 'convert_chars');
     add_filter('shopp_offline_payment_instructions', 'wpautop');
     $paymethod = shopp('purchase', 'get-paymethod');
     $Payments = ShoppOrder()->Payments;
     if (!$Payments->exists($paymethod)) {
         return false;
     }
     $Paymethod = $Payments->get($paymethod);
     list($module, $id) = explode('-', $Paymethod->setting);
     if (!isset($this->settings[$id])) {
         return false;
     }
     $settings = $this->settings[$id];
     if (!empty($settings['instructions'])) {
         return apply_filters('shopp_offline_payment_instructions', $settings['instructions']);
     }
     return false;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:30,代码来源:OfflinePayment.php

示例11: shipping_estimates

 /**
  * Displays the shipping estimate widget
  *
  * The shipping estimate widget allows shoppers to provide location
  * information so that shipping costs can be calculated.
  *
  * @api `shopp('cart.shipping-estimates')`
  * @since 1.0
  *
  * @param string    $result  The output
  * @param array     $options The options
  * - **class**: CSS class names to apply to the widget
  * - **postcode**: `on` (on, off) Show the post code field in the widget
  * @param ShoppCart $O       The working object
  * @return string The markup for the shipping estimate widget
  **/
 public static function shipping_estimates($result, $options, $O)
 {
     $defaults = array('postcode' => 'on', 'class' => 'ship-estimates', 'label' => Shopp::__('Estimate Shipping & Taxes'));
     $options = array_merge($defaults, $options);
     extract($options);
     if (empty($O->shipped)) {
         return '';
     }
     $markets = shopp_setting('target_markets');
     $Shipping = ShoppOrder()->Shipping;
     if (empty($markets)) {
         return '';
     }
     if (!empty($Shipping->country)) {
         $selected = $Shipping->country;
     } else {
         $selected = ShoppBaseLocale()->country();
     }
     $postcode = Shopp::str_true($postcode) || $O->showpostcode;
     $_ = '<div class="' . $class . '">';
     if (count($markets) > 1) {
         $_ .= '<span>';
         $_ .= '<select name="shipping[country]" id="shipping-country">';
         $_ .= menuoptions($markets, $selected, true);
         $_ .= '</select>';
         $_ .= '</span>';
     } else {
         $_ .= '<input type="hidden" name="shipping[country]" id="shipping-country" value="' . key($markets) . '" />';
     }
     if ($postcode) {
         $_ .= '<span>';
         $_ .= '<input type="text" name="shipping[postcode]" id="shipping-postcode" size="6" value="' . $Shipping->postcode . '"' . inputattrs($options) . ' />&nbsp;';
         $_ .= '</span>';
         $_ .= shopp('cart', 'get-update-button', array('value' => $label));
     }
     return $_ . '</div>';
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:53,代码来源:cart.php

示例12: tag

 /**
  * shopp('...','...') tags
  *
  * @author Jonathan Davis
  * @since 1.0
  * @version 1.2
  * @deprecated Retained for compatibility
  *
  * @param string $property The property to handle
  * @param array $options (optional) The tag options to process
  * @return mixed
  **/
 public function tag($property, array $options = array())
 {
     $options = array_merge(array('return' => true), shopp_parse_options($options));
     return shopp($this, $property, $options);
 }
开发者ID:crunnells,项目名称:shopp,代码行数:17,代码来源:DB.php

示例13: bloginfo

?>

<html>
	<div id="header">
		<h1><?php 
bloginfo('name');
?>
</h1>
		<h2><?php 
_e('Order', 'Shopp');
?>
 <?php 
shopp('purchase.id');
?>
</h2>
	</div>
	<div id="body">
		<?php 
shopp('purchase.receipt');
?>
		<?php 
if (shopp('purchase.notpaid') && shopp('checkout.get-offline-instructions')) {
    ?>
			<?php 
    shopp('checkout.offline-instructions');
    ?>
		<?php 
}
?>
	</div>
</html>
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:email-order.php

示例14: shopp

        ?>
            
                <?php 
        shopp('product.addons', 'mode=menu&label=true&defaults=' . __('Select an add-on', 'Shopp') . '&before_menu=<div class="addons_shopp">&after_menu=</div>');
        ?>
            
            <?php 
    }
    ?>
    
        </form>
        
    </div>

	<?php 
    shopp('product.description');
    ?>

	<?php 
    /* if ( shopp( 'product.has-specs' ) ) : ?>
    		<dl class="details">
    			<?php while ( shopp( 'product.specs' ) ) : ?>
    				<dt><?php shopp( 'product.spec', 'name' ); ?>:</dt>
    				<dd><?php shopp( 'product.spec', 'content' ); ?></dd>
    			<?php endwhile; ?>
    		</dl>
    	<?php endif; */
    ?>

<?php 
} else {
开发者ID:jimdough,项目名称:Roadmaster,代码行数:31,代码来源:product.php

示例15: ajax

 /**
  * Responds to AJAX-based cart requests
  *
  * @author Jonathan Davis
  * @since 1.0
  *
  * @return void
  **/
 public function ajax()
 {
     if ('html' == strtolower($_REQUEST['response'])) {
         shopp('cart.sidecart');
         exit;
     }
     $AjaxCart = new StdClass();
     $AjaxCart->url = Shopp::url(false, 'cart');
     $AjaxCart->label = __('Edit shopping cart', 'Shopp');
     $AjaxCart->checkouturl = Shopp::url(false, 'checkout', ShoppOrder()->security());
     $AjaxCart->checkoutLabel = __('Proceed to Checkout', 'Shopp');
     $AjaxCart->imguri = '' != get_option('permalink_structure') ? trailingslashit(Shopp::url('images')) : Shopp::url() . '&siid=';
     $AjaxCart->Totals = json_decode((string) $this->Totals);
     $AjaxCart->Contents = array();
     foreach ($this as $Item) {
         $CartItem = clone $Item;
         unset($CartItem->options);
         $AjaxCart->Contents[] = $CartItem;
     }
     if (isset($this->added)) {
         $AjaxCart->Item = clone $this->added();
     } else {
         $AjaxCart->Item = new ShoppCartItem();
     }
     unset($AjaxCart->Item->options);
     echo json_encode($AjaxCart);
     exit;
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:36,代码来源:Cart.php


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