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

PHP shopp函数代码示例

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

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



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


示例16: while

<ul class="shopp account">
	<?php 
while (shopp('storefront.account-menu')) {
    ?>
		<li>
			<a href="<?php 
    shopp('storefront.account-menuitem', 'url');
    ?>
"><?php 
    shopp('storefront.account-menuitem');
    ?>
</a>
		</li>
	<?php 
}
?>
</ul>
开发者ID:jimdough,项目名称:Roadmaster,代码行数:17,代码来源:account.php


示例17: wrapper

 /**
  * Wraps mark-up in a #shopp container, if needed
  *
  * @author Jonathan Davis
  * @since 1.1
  *
  * @param string $string The content markup to be wrapped
  * @param array $classes CSS classes to add to the container
  * @return string The wrapped markup
  **/
 static function wrapper($string)
 {
     $classes = array('shoppage', 'shopp_page');
     $views = array('list', 'grid');
     $view = shopp_setting('default_catalog_view');
     if (empty($view)) {
         $view = 'grid';
     }
     // Handle catalog view style cookie preference
     if (isset($_COOKIE['shopp_catalog_view'])) {
         $view = $_COOKIE['shopp_catalog_view'];
     }
     if (in_array($view, $views)) {
         $classes[] = $view;
     }
     $boxes = shopp_setting('row_products');
     if (empty($boxes)) {
         $boxes = 3;
     }
     $classes[] = 'shopp_grid-' . abs($boxes);
     // Add collection slug
     $Collection = ShoppCollection();
     if (!empty($Collection)) {
         if ($category = shopp('collection.get-slug')) {
             $classes[] = $category;
         }
     }
     // Add product id & slug classes
     $Product = ShoppProduct();
     if (!empty($Product)) {
         if ($productid = shopp('product.get-id')) {
             $classes[] = 'product-' . $productid;
         }
         if ($product = shopp('product.get-slug')) {
             $classes[] = $product;
         }
     }
     $classes = apply_filters('shopp_content_container_classes', $classes);
     $classes = esc_attr(join(' ', $classes));
     $id = false === strpos($string, 'id="shopp"') ? ' id="shopp" ' : '';
     return '<div' . $id . (!empty($classes) ? ' class="' . $classes . '"' : '') . '>' . $string . '</div>';
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:52,代码来源:Storefront.php


示例18: _addon_menus

 /**
  * Helper function that maps the current cart item's addons to the cart item's configured product menu options
  *
  * @internal
  * @since 1.3
  *
  * @param int $id The product ID to retrieve addon menus from
  * @return array A combined list of the menu labels list and addons menu map
  **/
 private static function _addon_menus()
 {
     return ShoppProductThemeAPI::_addon_menus(shopp('cartitem.get-product'));
 }
开发者ID:crunnells,项目名称:shopp,代码行数:13,代码来源:cartitem.php


示例19: bloginfo

<form method="get" id="searchform" action="<?php 
bloginfo('url');
?>
/">
    Search: <label class="searchbutton2">
      <?php 
shopp('catalog', 'search', 'type=radio&option=shopp');
?>
<span class="labelgap">Store</span>
    </label>
    <label class="searchbutton1">
    <?php 
shopp('catalog', 'search', 'type=radio&option=blog');
?>
<span class="labelgap">Blog</span></label><br />
      
    <input type="text" value="" name="s" id="s" class="searchfield" />
    <input type="submit" class="searchsubmit" name="searchsubmit" value="Find"><br />
    </form>
<script type="text/javascript" charset="utf-8">
  jQuery(document).ready(function(){
    searchclicker();
  });
  function searchclicker()
  {
    jQuery("input[name='st']")[0].checked = true;
  }
</script>
开发者ID:xentek,项目名称:shopp-architect,代码行数:28,代码来源:searchform.php


示例20: shopp

shopp('purchase.email-subject');
?>

<html>
	<div id="header">
		<h1><?php 
bloginfo('name');
?>
</h1>
		<h2><?php 
_e('Order Update', 'Shopp');
?>
</h2>
	</div>
	<div id="body">
		<?php 
shopp('purchase.email-note');
?>
		<p class="status"><?php 
_e('Your order is', 'Shopp');
?>
: <strong><?php 
shopp('purchase.status');
?>
</strong></p>
		<?php 
shopp('purchase.receipt');
?>
	</div>
</html>
开发者ID:jimdough,项目名称:Roadmaster,代码行数:30,代码来源:email.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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