Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

(Shopp Plugin) Display SKU in category loop WordPress

<strong>Software:</strong> Shopp 1.1.7

<strong>Issue:</strong> trying to display the sku number of a product within category.php (shop template)

<strong>Tried:</strong> shop docs, shop forums, and;

<?php shopp('product','sku'); ?> within <?php if(shopp('category','hasproducts','load=prices,images,specs,skus')): ?>

<strong>It didn’t work, but…</strong>

<?php shopp('cartitem','sku'); ?> within <?php while(shopp('cart','items')): ?> dose.

<em>Any Shopp users on here that could provide some tips would be much appreciated!</em>

Answers (1)

2011-04-12

Just Me answers:

<?php shopp('product','sku'); ?>
is not a valid tag within the Shopp plugin. There is only a (slightly different) option like that when you use variations.


You will have to add/create that tag by adding some custom coding to your functions.php

or

You can use the $Shopp variable and some extra code in the template file.

global $Shopp;
print_r($Shopp);


your additional code will look something like:
$my_sku=$Shopp->Product->sku;
echo $my_sku;


West Coast Design Co. comments:

Thanks Just Me,

Could we pay you to add this functionality? PS our development server is being updated with the new DB, doesn’t need to happen until tomorrow.

Cheers,


Just Me comments:

Thanks for the job offer but right now I have a full plate already.