<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>WordPress DK Forum Topic: wp e commerce plugin : best sellers hvordan fjerner jeg nummereringen af produkt</title>
		<link>http://wp-danmark.dk/forum/topic/wp-e-commerce-plugin-best-sellers-hvordan-fjerner-jeg-nummereringen-af-produkt</link>
		<description>WordPress DK Forum Topic: wp e commerce plugin : best sellers hvordan fjerner jeg nummereringen af produkt</description>
		<language>da-DK</language>
		<pubDate>Mon, 14 Sep 2026 15:03:40 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Søg]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://wp-danmark.dk/forum/search.php</link>
		</textInput>
		<atom:link href="http://wp-danmark.dk/forum/rss/topic/wp-e-commerce-plugin-best-sellers-hvordan-fjerner-jeg-nummereringen-af-produkt" rel="self" type="application/rss+xml" />

		<item>
			<title>andersbischoff@gmail.com om "wp e commerce plugin : best sellers hvordan fjerner jeg nummereringen af produkt"</title>
			<link>http://wp-danmark.dk/forum/topic/wp-e-commerce-plugin-best-sellers-hvordan-fjerner-jeg-nummereringen-af-produkt#post-21878</link>
			<pubDate>lør, 18 dec 2010 20:45:32 +0000</pubDate>
			<dc:creator>andersbischoff@gmail.com</dc:creator>
			<guid isPermaLink="false">21878@http://wp-danmark.dk/forum/</guid>
			<description>&#60;p&#62;hvordan fjerner jeg nummereringen af produkterne på mit plugin best sellers, &#60;/p&#62;
&#60;p&#62;eksempel kan ses på min side : &#60;a href=&#34;http://www.billig-apple.dk&#34; rel=&#34;nofollow&#34;&#62;http://www.billig-apple.dk&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Jeg vil tro det er denne fil der skal ændres noget i &#60;u&#62;wpsc-best-sellers.php&#60;/u&#62;&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
&#38;lt;?php&#60;br /&#62;
/*&#60;br /&#62;
Plugin Name:WP E-Commerce Best Sellers&#60;br /&#62;
Plugin URI: &#60;a href=&#34;http://www.dedoro.com&#34; rel=&#34;nofollow&#34;&#62;http://www.dedoro.com&#60;/a&#62;&#60;br /&#62;
Description: A widget that provides the best-sellers product Visit the &#60;a href='http://www.dedoro.com'&#62;cheap designer handbags&#60;/a&#62; for support.&#60;br /&#62;
Version: 0.1&#60;br /&#62;
Author: Dedoro&#60;br /&#62;
Author URI: &#60;a href=&#34;http://www.dedoro.com&#34; rel=&#34;nofollow&#34;&#62;http://www.dedoro.com&#60;/a&#62;&#60;br /&#62;
*/&#60;/p&#62;
&#60;p&#62;class WPSC_Best_Sellers_Widget extends WP_Widget&#60;br /&#62;
{&#60;br /&#62;
	/**&#60;br /&#62;
	* Declares the WPSC_Best_Sellers_Widget class.&#60;br /&#62;
	*&#60;br /&#62;
	*/&#60;br /&#62;
	function WPSC_Best_Sellers_Widget(){&#60;br /&#62;
		$widget_ops = array('best_sellers' =&#38;gt; '', 'description' =&#38;gt; __( &#34;Show Best Sellers Products&#34;) );&#60;br /&#62;
		$this-&#38;gt;WP_Widget(false, __('Best Sellers Product'), $widget_ops);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	/**&#60;br /&#62;
	* Displays the Widget&#60;br /&#62;
	*&#60;br /&#62;
	*/&#60;br /&#62;
	function widget($args, $instance){&#60;br /&#62;
		global $wpdb;&#60;/p&#62;
&#60;p&#62;		extract($args);&#60;br /&#62;
		$title = apply_filters('widget_title', empty($instance['title']) ? 'Best Sellers' : $instance['title']);&#60;br /&#62;
		$txt_img = empty($instance['text_or_image']) ? 'text' : $instance['text_or_image'];&#60;br /&#62;
		$best_sellers_id = empty($instance['best_sellers_id']) ? '' : $instance['best_sellers_id'];&#60;/p&#62;
&#60;p&#62;		# Before the widget&#60;br /&#62;
		echo $before_widget;&#60;br /&#62;
		# The title&#60;br /&#62;
		if ( $title )&#60;br /&#62;
			echo $before_title . $title . $after_title;&#60;/p&#62;
&#60;p&#62;		if ($best_sellers_id == &#34;&#34;) {&#60;br /&#62;
			$sql = &#34;select prodid, count(prodid) as prodnum from &#34; . $wpdb-&#38;gt;prefix. &#34;wpsc_cart_contents group by prodid order by prodnum desc LIMIT 10&#34;;&#60;br /&#62;
			$best_sellers_list = $wpdb-&#38;gt;get_results($sql,ARRAY_A);			&#60;/p&#62;
&#60;p&#62;			echo '&#38;lt;ol class=&#34;wpsc_best_sellers&#34;&#38;gt;';&#60;br /&#62;
			foreach((array)$best_sellers_list as $best_sellers) {&#60;br /&#62;
  			$sql=&#34;SELECT list.id,list.name,list.price,image.image,list.special,list.special_price&#60;br /&#62;
        FROM &#34;.$wpdb-&#38;gt;prefix.&#34;wpsc_product_list AS list&#60;br /&#62;
        LEFT JOIN &#34;.$wpdb-&#38;gt;prefix.&#34;wpsc_product_images AS image&#60;br /&#62;
        ON list.image=image.id WHERE list.id=&#34; . $best_sellers['prodid'];&#60;/p&#62;
&#60;p&#62;  			$product_list = $wpdb-&#38;gt;get_results($sql,ARRAY_A);&#60;br /&#62;
  			$product = $product_list[0];&#60;br /&#62;
  			if ($txt_img == &#34;text&#34;) {&#60;br /&#62;
  				echo '
&#60;li&#62;&#60;a href=&#34;' . wpsc_product_url($product['id']) . '&#34;&#62;' . stripslashes($product['name']) . '&#60;/a&#62;&#60;/li&#62;
';&#60;br /&#62;
  			}else{&#60;br /&#62;
  				$output = &#34;&#38;lt;img src='&#34;.WPSC_THUMBNAIL_URL.$product['image'].&#34;' title='&#34;.$product['name'].&#34;' alt='&#34;.$product['name'].&#34;' /&#38;gt;&#34;;&#60;br /&#62;
  				echo '
&#60;li&#62;&#60;a href=&#34;' . wpsc_product_url($product['id']) . '&#34;&#62;' . $output . '&#60;/a&#62;&#60;/li&#62;
';&#60;br /&#62;
  			}				&#60;/p&#62;
&#60;p&#62;			}&#60;br /&#62;
			echo '';&#60;/p&#62;
&#60;p&#62;		}else{&#60;br /&#62;
			$productids = split(&#34;,&#34;,$best_sellers_id);&#60;br /&#62;
			echo '&#38;lt;ol class=&#34;wpsc_best_sellers&#34;&#38;gt;';&#60;br /&#62;
			foreach((array)$productids as $product_id) {&#60;br /&#62;
  			$sql=&#34;SELECT list.id,list.name,list.price,image.image,list.special,list.special_price&#60;br /&#62;
        FROM &#34;.$wpdb-&#38;gt;prefix.&#34;wpsc_product_list AS list&#60;br /&#62;
        LEFT JOIN &#34;.$wpdb-&#38;gt;prefix.&#34;wpsc_product_images AS image&#60;br /&#62;
        ON list.image=image.id WHERE list.id=&#34; . $product_id;&#60;/p&#62;
&#60;p&#62;  			$product_list = $wpdb-&#38;gt;get_results($sql,ARRAY_A);&#60;br /&#62;
  			$product = $product_list[0];&#60;br /&#62;
  			if ($txt_img == &#34;text&#34;) {&#60;br /&#62;
  				echo '
&#60;li&#62;&#60;a href=&#34;' . wpsc_product_url($product['id']) . '&#34;&#62;' . stripslashes($product['name']) . '&#60;/a&#62;&#60;/li&#62;
';&#60;br /&#62;
  			}else{&#60;br /&#62;
  				$output = &#34;&#38;lt;img src='&#34;.WPSC_THUMBNAIL_URL.$product['image'].&#34;' title='&#34;.$product['name'].&#34;' alt='&#34;.$product['name'].&#34;' /&#38;gt;&#34;;&#60;br /&#62;
  				echo '
&#60;li&#62;&#60;a href=&#34;' . wpsc_product_url($product['id']) . '&#34;&#62;' . $output . '&#60;/a&#62;&#60;/li&#62;
';&#60;br /&#62;
  			}&#60;/p&#62;
&#60;p&#62;			}&#60;br /&#62;
			echo '';&#60;br /&#62;
		}	&#60;/p&#62;
&#60;p&#62;		echo $after_widget;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	/**&#60;br /&#62;
	* Saves the widgets settings.&#60;br /&#62;
	*&#60;br /&#62;
	*/&#60;br /&#62;
	function update($new_instance, $old_instance){&#60;br /&#62;
		$instance = $old_instance;&#60;br /&#62;
		$instance['title'] = strip_tags(stripslashes($new_instance['title']));&#60;br /&#62;
		$instance['text_or_image'] = strip_tags(stripslashes($new_instance['text_or_image']));&#60;br /&#62;
		$instance['best_sellers_id'] = strip_tags(stripslashes($new_instance['best_sellers_id']));&#60;/p&#62;
&#60;p&#62;		return $instance;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	/**&#60;br /&#62;
	* Creates the edit form for the widget.&#60;br /&#62;
	*&#60;br /&#62;
	*/&#60;br /&#62;
	function form($instance){&#60;br /&#62;
		//Defaults&#60;br /&#62;
		$instance = wp_parse_args( (array) $instance, array('title'=&#38;gt;'Best Sellers', 'text_or_image'=&#38;gt;'text', 'best_sellers_id'=&#38;gt;'') );&#60;/p&#62;
&#60;p&#62;		$title = htmlspecialchars($instance['title']);&#60;br /&#62;
		$txt_img = htmlspecialchars($instance['text_or_image']);&#60;br /&#62;
		$best_sellers_id = htmlspecialchars($instance['best_sellers_id']);&#60;/p&#62;
&#60;p&#62;		# Output the options&#60;br /&#62;
		echo '&#38;lt;p&#38;gt;&#38;lt;label for=&#34;' . $this-&#38;gt;get_field_name('title') . '&#34;&#38;gt;' . __('Title:') . ' &#38;lt;/label&#38;gt; &#38;lt;input class=&#34;widefat&#34; id=&#34;' . $this-&#38;gt;get_field_id('title') . '&#34; name=&#34;' . $this-&#38;gt;get_field_name('title') . '&#34; type=&#34;text&#34; value=&#34;' . $title . '&#34; /&#38;gt;&#38;lt;/p&#38;gt;';&#60;br /&#62;
		# Text or Image&#60;br /&#62;
		if ($txt_img == &#34;text&#34;){&#60;br /&#62;
		   $text = '&#38;lt;INPUT TYPE=RADIO ' . 'id=&#34;' . $this-&#38;gt;get_field_id('text_or_image') . '&#34; NAME=&#34;' . $this-&#38;gt;get_field_name('text_or_image') . '&#34; VALUE=&#34;text&#34; CHECKED&#38;gt;TEXT';&#60;br /&#62;
		   $image = '&#38;lt;INPUT TYPE=RADIO ' . 'id=&#34;' . $this-&#38;gt;get_field_id('text_or_image') . '&#34; NAME=&#34;' . $this-&#38;gt;get_field_name('text_or_image') . '&#34; VALUE=&#34;image&#34;&#38;gt;IMAGE';&#60;br /&#62;
		}&#60;br /&#62;
		else{&#60;br /&#62;
		   $text = '&#38;lt;INPUT TYPE=RADIO ' . 'id=&#34;' . $this-&#38;gt;get_field_id('text_or_image') . '&#34; NAME=&#34;' . $this-&#38;gt;get_field_name('text_or_image') . '&#34; VALUE=&#34;text&#34;&#38;gt;TEXT';&#60;br /&#62;
		   $image = '&#38;lt;INPUT TYPE=RADIO ' . 'id=&#34;' . $this-&#38;gt;get_field_id('text_or_image') . '&#34; NAME=&#34;' . $this-&#38;gt;get_field_name('text_or_image') . '&#34; VALUE=&#34;image&#34; CHECKED&#38;gt;IMAGE';&#60;br /&#62;
	  }&#60;br /&#62;
		echo '&#38;lt;p&#38;gt;&#38;lt;label for=&#34;' . $this-&#38;gt;get_field_name('text_or_image') . '&#34;&#38;gt;' . __('Text or Image?') . '&#38;lt;/label&#38;gt;&#60;br /&#62;' . $text . '&#38;nbsp;&#38;nbsp;' . $image . '&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;    # Best Sellers Product ID&#60;br /&#62;
		echo '&#38;lt;p&#38;gt;&#38;lt;label for=&#34;' . $this-&#38;gt;get_field_name('best_sellers_id') . '&#34;&#38;gt;' . __('Product IDs:') . ' &#38;lt;/label&#38;gt;&#38;lt;input id=&#34;' . $this-&#38;gt;get_field_id('best_sellers_id') . '&#34; name=&#34;' . $this-&#38;gt;get_field_name('best_sellers_id') . '&#34; type=&#34;text&#34; value=&#34;' . $best_sellers_id . '&#34; /&#38;gt;&#38;lt;/p&#38;gt;';&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;}// END class&#60;/p&#62;
&#60;p&#62;	/**&#60;br /&#62;
	* Register Best Sellers widget.&#60;br /&#62;
	*&#60;br /&#62;
	*/&#60;br /&#62;
	function WPSC_Best_Sellers_Init() {&#60;br /&#62;
	register_widget('WPSC_Best_Sellers_Widget');&#60;br /&#62;
	}&#60;br /&#62;
	add_action('widgets_init', 'WPSC_Best_Sellers_Init');&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Jeg håber virkelig at der er nogle der kan besvare mit spørgsmål, Tak. &#60;/p&#62;
&#60;p&#62;M.v.h. Anders Bischoff
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
