Strange problem I'm having. I'm using the Visio theme with wp e-commerce plugin. Anyway, I skinned a widget that is provided through wp e-commerce so it displays two rows of thumbnails instead of one. It worked fine on a test blog (here) but didn't work on the real site (here), seems that the CSS isn't being applied (ie, I can change the padding with no effect on the real site). php and CSS are below, any ideas? Thanks in advance!
-
CSS
div#sidebar div. item_image_right img {
float:right;
border:medium none;
max-width:none !important;
padding:100px 0pt 0pt 2px;
}
div#sidebar div. item_image_left img {
border:medium none;
max-width:none !important;
padding:100px 0pt 0pt 20px;
}
-
php
function nzshpcrt_latest_product($input = null) {
global $wpdb;
$siteurl = get_option('siteurl');
$latest_product = $wpdb->get_results("SELECT * FROM <code>".WPSC_TABLE_PRODUCT_LIST."</code> WHERE <code>active</code> IN ('1') ORDER BY <code>id</code> DESC LIMIT 10", ARRAY_A);
if($latest_product != null) {
$output = "<div>";
$count = 0;
foreach($latest_product as $special) {
if($count % 2 == 0){
$output.="<div>";
$output.="<div class='item_image_right'>";
$output.="<a href='".wpsc_product_url($special['id'],$special['category'])."'>";
if(($special['image'] > 0)) {
if(get_option('wpsc_selected_theme') == 'marketplace') {
$src = WPSC_IMAGE_URL.$special['image'];
$output .= " <img src='". "index.php?image_id={$special['image']}&width=100&height=75' title='".$special['name']."' alt='".$special['name']."' />";
} else {
$output .= " <img src='". "index.php?image_id={$special['image']}&width=75&height=75'/> ";
}
} else {
//$output .= "<img src='$siteurl/wp-content/plugins/wp-shopping-cart/no-image-uploaded.gif' /><br />";
}
$output.=" </a>";
$output .= " </div>";
$output .= " </a>";
$output .= "</div>";
$count++;
}
else{
$count++;
$output.="<div>";
$output .= " <div class='item_image_left'>";
$output.=" <a href='".wpsc_product_url($special['id'],$special['category'])."'>";
if(($special['image'] > 0)) {
if(get_option('wpsc_selected_theme') == 'marketplace') {
$src = WPSC_IMAGE_URL.$special['image'];
$output .= " <img src='". "index.php?image_id={$special['image']}&width=100&height=75' title='".$special['name']."' alt='".$special['name']."' />";
} else {
$output .= " <img src='". "index.php?image_id={$special['image']}&width=75&height=75' title='".$special['name']."' alt='".$special['name']."' /> ";
}
} else {
//$output .= "<img src='$siteurl/wp-content/plugins/wp-shopping-cart/no-image-uploaded.gif' title='".$special['name']."' alt='".$special['name']."' /><br />";
}
$output.=" </a>";
$output .= " </div>";
$output .= " </a>";
$output .= "</div>";
}
}
$output .= "</div>";
} else {
$output = '';
}
echo $input.$output;
}