Exemplo n.º 1
0
 /**
  * No longer used
  *
  * @deprecated Use shopp('storefront','account-menuitem') instead.
  *
  * @param string        $result  The output
  * @param array         $options The options
  * @param ShoppCustomer $O       The working object
  * @return string
  **/
 public static function management($result, $options, $O)
 {
     return ShoppStorefrontThemeAPI::account_menuitem($result, $options, $O);
 }
Exemplo n.º 2
0
 /**
  * Displays payment processor error messages after the order is submitted for payment
  *
  * @api `shopp('checkout.error')`
  * @since 1.0
  *
  * @param string     $result  The output
  * @param array      $options The options
  * @param ShoppOrder $O       The working object
  * @return string The errors
  **/
 public static function error($result, $options, $O)
 {
     return ShoppStorefrontThemeAPI::errors($result, $options, $O);
 }
Exemplo n.º 3
0
 /**
  * Provides markup for displaying a product image
  *
  * @api `shopp('product.image')`
  * @since 1.0
  *
  * @param string       $result  The output
  * @param array        $options The options
  * - **alt**: The alt property of the image
  * - **bg**: The background color to use with the matte fit (#rrggbb)
  * - **class**: Specifies the CSS class of the image
  * - **fit**: The fit of unproportional images to the requested size:
  *   - **all**: Scale the image down to fit within the new size (the final size may differ from the specified dimensions)
  *   - **crop**: Scale the image down to fit by the smallest dimension to fill the entire image, cropping the extra off the other dimension (specific cropping adjustments can be made in the product editor)
  *   - **height**: Scale the image down to fit the image in the new size by the height, cropping any extra width
  *   - **matte**: Scale the image down to fit within the new size filling extra space with a background color
  *   - **width**: Scale the image down to fit the image in the new size by the width, cropping any extra height
  * - **id**: Specify the image to show by the database ID
  * - **index**: Specify the index of the image to show
  * - **property**: (id,url,src,title,alt,width,height,class) Provide a property of the image rather than the image markup
  * - **quality**: The JPEG image quality (0-100%, default is 80)
  * - **sharpen**: Apply an unsharp mask to the image (100%-500%, default is none)
  * - **size**: The size to use for width and height of the image (used in place of width and height)
  * - **title**: The title property of the image
  * - **width**: The width of the image in pixels
  * - **height**: The height of the image in pixels
  * - **zoom**: `off` Enables the image zoom effect to view the original size image in a modal image viewer (Colorbox)
  * - **zoomfx**: `shopp-zoom` Enables zoom (also known as lightbox) effects for alternate JavaScript-based modal content viewers.
  * @param ShoppProduct $O       The working object
  * @return string The generated image markup
  **/
 public static function image($result, $options, $O)
 {
     $loadset = array('images', 'coverimages');
     if (empty($options['load']) || !in_array($options['load'], $loadset)) {
         $options['load'] = $loading[0];
     }
     // Load images if no images are loaded or we're loading all images after the coverimage was loaded
     if (empty($O->images) || 'images' == $options['load']) {
         $O->load_data(array($options['load']));
     }
     return ShoppStorefrontThemeAPI::image($result, $options, $O);
 }
Exemplo n.º 4
0
 /**
  * Provides the markup to show the cover image for the cart item's product
  *
  * The **cover image** of a product is the image that is set as the first image
  * when using a customer image order, or which ever image is automatically sorted
  * to be first when using other image order settings in the Presentation settings screen.
  *
  * @api `shopp('cartitem.coverimage')`
  * @since 1.2
  *
  * @param string        $result  The output
  * @param array         $options The options
  * @param ShoppCartItem $O       The working object
  * @return string The image markup
  **/
 public static function coverimage($result, $options, $O)
 {
     if (false === $O->image) {
         return false;
     }
     $O->images = array($O->image);
     $options['index'] = 0;
     return ShoppStorefrontThemeAPI::image($result, $options, $O);
 }
Exemplo n.º 5
0
 /**
  * Provides markup for a list of subcategories of the current category
  *
  * @api `shopp('collection.subcategories')`
  * @since 1.2
  *
  * @param string          $result  The output
  * @param array           $options The options
  * @param ShoppCollection $O       The working object
  * @return string The subcategory list markup
  **/
 public static function subcategory_list($result, $options, $O)
 {
     if (!isset($O->id) || empty($O->id)) {
         return false;
     }
     $options['childof'] = $O->id;
     $options['default'] = Shopp::__('Select a sub-category…');
     return ShoppStorefrontThemeAPI::category_list($result, $options, $O);
 }