Archive for the 'Shopp Plugin' Category

Adding category depth tag to Shopp 1.1.*

Problem: I needed to display sub categories of a category in category.php but only one level deep. Using: <?php if(shopp(’category’,'hascategories’)): ?> <?php while(shopp(’category’,'subcategories’)): ?> //display stuff <?php endwhile; ?> <?php endif; ?> …displays all subcast AND their subcats. Fix: I decided to add a new tag, called shopp(‘subcategory’, ‘depth’) that would return the category depth. [...]

Getting subcategory totals [shopp('subcategory','total')] to work in Shopp Plugin 1.1.*

Problem: Pulling the total number of products from a subcat in Shopp doesn’t seem to work out the box. For example, this code WON’T return the total even though the correct tag shopp(‘subcategory’,’total’) is used: <?php while(shopp(’category’,'subcategories’)): ?> <?php shopp(’subcategory’,'name’); ?> (<?php shopp(’subcategory’,'total’); ?>) <?php endwhile; ?> Fix: For the products to be countable, the [...]

Remove prices from Variation drop-downs in Shopp WordPress plugin

Problem: In Shopp (1.1.9) the default variations drop-down list shows prices. This isn’t always desired. This is the default usage: <ul class="variations"> <?php shopp(’product’, ‘variations’, ‘mode=multiple&label=true&defaults=Select an option&before_menu=<li>&after_menu=</li>’); ?> </ul> And this outputs a list that shows options as “Option Label (price)”. Fix: The code above can be replaced with this code to manually create [...]

Capture last viewed category in product view in Shopp Plugin for WordPress

Problem: I’m using the Shopp 1.1.9 ecommerce plugin for WordPress, and my client wanted to display specific background images while showing certain products. Shopp is very complete, but one thing that is missing in the current version ‘out of the box’ is the ability to pull the ‘last viewed’ category name when viewing a product. [...]

Add ‘Related Products’ to the Product Template in the Shopp WordPress Plugin

Problem: Today I needed to add some code to a Shopp (ver 1.1.9) product.php template so that related products (that have same ‘Tag’) would show up at the bottom. The ‘Related Products‘ template tag was not behaving as I expected it to.. i.e. it was stopping the product page rendering anything at all. Fix: After chatting to some [...]

Add ‘Drafts’ sorting to Shopp Products list

Problem: There is no ‘drafts’ view filter in the Shopp (>1.1.9) Product Manager, i.e you can’t quickly list all the products that have ‘draft’ status in one go. Fix: I made this mod to answer a question in the Shopp Helpdesk forum, it’s not very tested, but seems to work perfectly! Open ‘wp-content/plugins/shopp/core/flow/Warehouse.php’ and replace [...]