WordPress.org

Plugin Directory

Changeset 532255


Ignore:
Timestamp:
04/17/12 12:33:48 (2 years ago)
Author:
ldebrouwer
Message:

Version 0.3.5. Fixed some typos, improved the dashboard. Made sure the wizard works with tradetracker.net affiliate feeds.

Location:
affiliate-press
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • affiliate-press/tags/0.3.5/affiliate-press.php

    r532055 r532255  
    22/** 
    33 * @package Affiliate_Press 
    4  * @version 0.3.4 
     4 * @version 0.3.5 
    55 */ 
    66/* 
     
    99Description: Affiliate Press allows you to set up an affiliate website based on product feeds as easy as 1-2-3. 
    1010Author: ldebrouwer 
    11 Version: 0.3.4 
     11Version: 0.3.5 
    1212Author URI: http://lucdebrouwer.nl/ 
    1313*/ 
     
    3131function AP_activation() { 
    3232    include( LDB_AP_PATH . 'affiliate-press-upgrade.php' ); 
    33     update_option( 'LDB_Affiliate_Press_Version', '0.3.4' ); 
     33    update_option( 'LDB_Affiliate_Press_Version', '0.3.5' ); 
    3434    wp_schedule_event( time(), 'hourly', 'AP_cronjob' ); 
    3535} 
  • affiliate-press/tags/0.3.5/includes/class-affiliate-press.php

    r532055 r532255  
    277277            $dashboard['products'] = count( get_posts( array( 'post_type' => 'product', 'post_status' => array( 'publish', 'draft' ) ) ) ); 
    278278            $dashboard['feeds'] = count( $wpdb->get_results( 'SELECT ID FROM ' . $wpdb->prefix . 'apfeeds', ARRAY_A ) ); 
    279             $dashboard['multipleprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices WHERE ' . $wpdb->prefix . 'apprices.productID = products.ID) > 1 AND post_type="product"', ARRAY_A ) ); 
    280             $dashboard['oneprice'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices WHERE ' . $wpdb->prefix . 'apprices.productID = products.ID) = 1 AND post_type="product"', ARRAY_A ) ); 
    281             $dashboard['noprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices WHERE ' . $wpdb->prefix . 'apprices.productID = products.ID) = 0 AND post_type="product"', ARRAY_A ) ); 
     279            $dashboard['multipleprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices AS prices WHERE prices.productID = products.ID AND prices.online = 1 ) > 1 AND post_type="product" AND ( post_status = "draft" OR post_status = "publish" )', ARRAY_A ) ); 
     280            $dashboard['oneprice'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices AS prices WHERE prices.productID = products.ID AND prices.online = 1 ) = 1 AND post_type="product" AND ( post_status = "draft" OR post_status = "publish" )', ARRAY_A ) ); 
     281            $dashboard['noprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices AS prices WHERE prices.productID = products.ID AND prices.online = 1 ) = 0 AND post_type="product" AND ( post_status = "draft" OR post_status = "publish" )', ARRAY_A ) ); 
    282282            include( LDB_AP_VIEW_PATH . 'dashboard.php' ); 
    283283        } 
     
    666666            if( $data ) { 
    667667                foreach( $data as $row ){ 
    668                     $table.= '<tr><td><a href="' . $row->link . '" target="_blank">' . $row->title . '</a></td><td>' . $row->price . '</td></tr>'; 
     668                    $table.= '<tr><td><a href="' . $row->link . '" target="_blank">' . $row->title . '</a></td><td>' . $row->currency . ' ' . $row->price . '</td></tr>'; 
    669669                } 
    670670            } else { 
     
    678678        function AP_getPrices( $table = false ) { 
    679679            global $post, $wpdb; 
    680             $results = $wpdb->get_results( 'SELECT apfeeds.title, apprices.price, apprices.link FROM ' . $wpdb->prefix . 'apprices apprices, ' . $wpdb->prefix . 'apfeeds apfeeds WHERE apprices.productID = ' . $post->ID . ' AND apprices.feedID = apfeeds.ID AND apprices.online = 1 ORDER BY apprices.price ASC' ); 
     680            $results = $wpdb->get_results( 'SELECT apfeeds.title, apfeeds.currency, apprices.price, apprices.link FROM ' . $wpdb->prefix . 'apprices apprices, ' . $wpdb->prefix . 'apfeeds apfeeds WHERE apprices.productID = ' . $post->ID . ' AND apprices.feedID = apfeeds.ID AND apprices.online = 1 ORDER BY apprices.price ASC' ); 
    681681            if ( $table ) 
    682682                $results = $this->AP_buildTable( $results ); 
  • affiliate-press/tags/0.3.5/readme.txt

    r532055 r532255  
    55Requires at least: 3.3 
    66Tested up to: 3.4 
    7 Stable tag: 0.3.4 
     7Stable tag: 0.3.5 
    88 
    99Affiliate Press allows you to set up an affiliate website based on product feeds as easy as 1-2-3. 
     
    5757== Changelog == 
    5858 
     59= 0.3.5 = 
     60* Confirmed that the wizard also works with tradetracker.net product feeds. 
     61* Made some changes to the way how the dashboard statistics are calculated. 
     62* Added the currency to the price table for the front-end. 
     63* Fixed some typos. 
     64 
    5965= 0.3.4 = 
    6066* Added a first version of the dashboard. 
  • affiliate-press/tags/0.3.5/views/feed-add-wizard-step2.php

    r530018 r532255  
    1111                <table class="form-table"> 
    1212                    <tr> 
    13                         <th scope="row"><label for="item_xpath"><?php echo __( 'Item Xpath', 'LDB_AP' ); ?></label></th> 
    14                         <td><?php echo $item_xpath; ?><br /><span class="description"><?php echo __( 'The Xpath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
     13                        <th scope="row"><label for="item_xpath"><?php echo __( 'Item XPath', 'LDB_AP' ); ?></label></th> 
     14                        <td><?php echo $item_xpath; ?><br /><span class="description"><?php echo __( 'The XPath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
    1515                    </tr> 
    1616                </table> 
  • affiliate-press/tags/0.3.5/views/feed-add-wizard-step3.php

    r530018 r532255  
    1313                <table class="form-table"> 
    1414                    <tr> 
    15                         <th scope="row"><label for="name_xpath"><?php echo __( 'Name Xpath', 'LDB_AP' ); ?></label></th> 
    16                         <td><?php echo $xpath['name']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product name.', 'LDB_AP' ); ?></span></td> 
     15                        <th scope="row"><label for="name_xpath"><?php echo __( 'Name XPath', 'LDB_AP' ); ?></label></th> 
     16                        <td><?php echo $xpath['name']; ?><br /><span class="description"><?php echo __( 'The XPath to the product name.', 'LDB_AP' ); ?></span></td> 
    1717                    </tr> 
    1818                    <tr> 
    19                         <th scope="row"><label for="image_xpath"><?php echo __( 'Image Xpath', 'LDB_AP' ); ?></label></th> 
    20                         <td><?php echo $xpath['image']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product image.', 'LDB_AP' ); ?></span></td> 
     19                        <th scope="row"><label for="image_xpath"><?php echo __( 'Image XPath', 'LDB_AP' ); ?></label></th> 
     20                        <td><?php echo $xpath['image']; ?><br /><span class="description"><?php echo __( 'The XPath to the product image.', 'LDB_AP' ); ?></span></td> 
    2121                    </tr> 
    2222                    <tr> 
    23                         <th scope="row"><label for="price_xpath"><?php echo __( 'Price Xpath', 'LDB_AP' ); ?></label></th> 
    24                         <td><?php echo $xpath['price']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product price.', 'LDB_AP' ); ?></span></td> 
     23                        <th scope="row"><label for="price_xpath"><?php echo __( 'Price XPath', 'LDB_AP' ); ?></label></th> 
     24                        <td><?php echo $xpath['price']; ?><br /><span class="description"><?php echo __( 'The XPath to the product price.', 'LDB_AP' ); ?></span></td> 
    2525                    </tr> 
    2626                    <tr> 
    27                         <th scope="row"><label for="link_xpath"><?php echo __( 'Link Xpath', 'LDB_AP' ); ?></label></th> 
    28                         <td><?php echo $xpath['link']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product link.', 'LDB_AP' ); ?></span></td> 
     27                        <th scope="row"><label for="link_xpath"><?php echo __( 'Link XPath', 'LDB_AP' ); ?></label></th> 
     28                        <td><?php echo $xpath['link']; ?><br /><span class="description"><?php echo __( 'The XPath to the product link.', 'LDB_AP' ); ?></span></td> 
    2929                    </tr> 
    3030                    <tr> 
    31                         <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier Xpath', 'LDB_AP' ); ?></label></th> 
    32                         <td><?php echo $xpath['identifier']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product identifier.', 'LDB_AP' ); ?></span></td> 
     31                        <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier XPath', 'LDB_AP' ); ?></label></th> 
     32                        <td><?php echo $xpath['identifier']; ?><br /><span class="description"><?php echo __( 'The XPath to the product identifier.', 'LDB_AP' ); ?></span></td> 
    3333                    </tr> 
    3434                    <tr> 
  • affiliate-press/tags/0.3.5/views/feed-add.php

    r529259 r532255  
    1919                    </tr> 
    2020                    <tr> 
    21                         <th scope="row"><label for="item_xpath"><?php echo __( 'Item Xpath', 'LDB_AP' ); ?></label></th> 
    22                         <td><input name="item_xpath" type="text" id="item_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
     21                        <th scope="row"><label for="item_xpath"><?php echo __( 'Item XPath', 'LDB_AP' ); ?></label></th> 
     22                        <td><input name="item_xpath" type="text" id="item_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
    2323                    </tr> 
    2424                    <tr> 
    25                         <th scope="row"><label for="name_xpath"><?php echo __( 'Name Xpath', 'LDB_AP' ); ?></label></th> 
    26                         <td><input name="name_xpath" type="text" id="name_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product name.', 'LDB_AP' ); ?></span></td> 
     25                        <th scope="row"><label for="name_xpath"><?php echo __( 'Name XPath', 'LDB_AP' ); ?></label></th> 
     26                        <td><input name="name_xpath" type="text" id="name_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product name.', 'LDB_AP' ); ?></span></td> 
    2727                    </tr> 
    2828                    <tr> 
    29                         <th scope="row"><label for="image_xpath"><?php echo __( 'Image Xpath', 'LDB_AP' ); ?></label></th> 
    30                         <td><input name="image_xpath" type="text" id="image_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product image.', 'LDB_AP' ); ?></span></td> 
     29                        <th scope="row"><label for="image_xpath"><?php echo __( 'Image XPath', 'LDB_AP' ); ?></label></th> 
     30                        <td><input name="image_xpath" type="text" id="image_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product image.', 'LDB_AP' ); ?></span></td> 
    3131                    </tr> 
    3232                    <tr> 
    33                         <th scope="row"><label for="price_xpath"><?php echo __( 'Price Xpath', 'LDB_AP' ); ?></label></th> 
    34                         <td><input name="price_xpath" type="text" id="price_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product price.', 'LDB_AP' ); ?></span></td> 
     33                        <th scope="row"><label for="price_xpath"><?php echo __( 'Price XPath', 'LDB_AP' ); ?></label></th> 
     34                        <td><input name="price_xpath" type="text" id="price_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product price.', 'LDB_AP' ); ?></span></td> 
    3535                    </tr> 
    3636                    <tr> 
    37                         <th scope="row"><label for="link_xpath"><?php echo __( 'Link Xpath', 'LDB_AP' ); ?></label></th> 
    38                         <td><input name="link_xpath" type="text" id="link_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product link.', 'LDB_AP' ); ?></span></td> 
     37                        <th scope="row"><label for="link_xpath"><?php echo __( 'Link XPath', 'LDB_AP' ); ?></label></th> 
     38                        <td><input name="link_xpath" type="text" id="link_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product link.', 'LDB_AP' ); ?></span></td> 
    3939                    </tr> 
    4040                    <tr> 
    41                         <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier Xpath', 'LDB_AP' ); ?></label></th> 
    42                         <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product identifier.', 'LDB_AP' ); ?></span></td> 
     41                        <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier XPath', 'LDB_AP' ); ?></label></th> 
     42                        <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product identifier.', 'LDB_AP' ); ?></span></td> 
    4343                    </tr> 
    4444                    <tr> 
  • affiliate-press/tags/0.3.5/views/feed-edit.php

    r529259 r532255  
    2020                    </tr> 
    2121                    <tr> 
    22                         <th scope="row"><label for="item_xpath"><?php echo __( 'Item Xpath', 'LDB_AP' ); ?></label></th> 
    23                         <td><input name="item_xpath" type="text" id="item_xpath" value="<?php echo $feed['item_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
     22                        <th scope="row"><label for="item_xpath"><?php echo __( 'Item XPath', 'LDB_AP' ); ?></label></th> 
     23                        <td><input name="item_xpath" type="text" id="item_xpath" value="<?php echo $feed['item_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
    2424                    </tr> 
    2525                    <tr> 
    26                         <th scope="row"><label for="name_xpath"><?php echo __( 'Name Xpath', 'LDB_AP' ); ?></label></th> 
    27                         <td><input name="name_xpath" type="text" id="name_xpath" value="<?php echo $feed['name_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product name.', 'LDB_AP' ); ?></span></td> 
     26                        <th scope="row"><label for="name_xpath"><?php echo __( 'Name XPath', 'LDB_AP' ); ?></label></th> 
     27                        <td><input name="name_xpath" type="text" id="name_xpath" value="<?php echo $feed['name_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product name.', 'LDB_AP' ); ?></span></td> 
    2828                    </tr> 
    2929                    <tr> 
    30                         <th scope="row"><label for="image_xpath"><?php echo __( 'Image Xpath', 'LDB_AP' ); ?></label></th> 
    31                         <td><input name="image_xpath" type="text" id="image_xpath" value="<?php echo $feed['image_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product image.', 'LDB_AP' ); ?></span></td> 
     30                        <th scope="row"><label for="image_xpath"><?php echo __( 'Image XPath', 'LDB_AP' ); ?></label></th> 
     31                        <td><input name="image_xpath" type="text" id="image_xpath" value="<?php echo $feed['image_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product image.', 'LDB_AP' ); ?></span></td> 
    3232                    </tr> 
    3333                    <tr> 
    34                         <th scope="row"><label for="price_xpath"><?php echo __( 'Price Xpath', 'LDB_AP' ); ?></label></th> 
    35                         <td><input name="price_xpath" type="text" id="price_xpath" value="<?php echo $feed['price_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product price.', 'LDB_AP' ); ?></span></td> 
     34                        <th scope="row"><label for="price_xpath"><?php echo __( 'Price XPath', 'LDB_AP' ); ?></label></th> 
     35                        <td><input name="price_xpath" type="text" id="price_xpath" value="<?php echo $feed['price_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product price.', 'LDB_AP' ); ?></span></td> 
    3636                    </tr> 
    3737                    <tr> 
    38                         <th scope="row"><label for="link_xpath"><?php echo __( 'Link Xpath', 'LDB_AP' ); ?></label></th> 
    39                         <td><input name="link_xpath" type="text" id="link_xpath" value="<?php echo $feed['link_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product link.', 'LDB_AP' ); ?></span></td> 
     38                        <th scope="row"><label for="link_xpath"><?php echo __( 'Link XPath', 'LDB_AP' ); ?></label></th> 
     39                        <td><input name="link_xpath" type="text" id="link_xpath" value="<?php echo $feed['link_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product link.', 'LDB_AP' ); ?></span></td> 
    4040                    </tr> 
    4141                    <tr> 
    42                         <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier Xpath', 'LDB_AP' ); ?></label></th> 
    43                         <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="<?php echo $feed['identifier_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product identifier.', 'LDB_AP' ); ?></span></td> 
     42                        <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier XPath', 'LDB_AP' ); ?></label></th> 
     43                        <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="<?php echo $feed['identifier_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product identifier.', 'LDB_AP' ); ?></span></td> 
    4444                    </tr> 
    4545                    <tr> 
  • affiliate-press/trunk/affiliate-press.php

    r532055 r532255  
    22/** 
    33 * @package Affiliate_Press 
    4  * @version 0.3.4 
     4 * @version 0.3.5 
    55 */ 
    66/* 
     
    99Description: Affiliate Press allows you to set up an affiliate website based on product feeds as easy as 1-2-3. 
    1010Author: ldebrouwer 
    11 Version: 0.3.4 
     11Version: 0.3.5 
    1212Author URI: http://lucdebrouwer.nl/ 
    1313*/ 
     
    3131function AP_activation() { 
    3232    include( LDB_AP_PATH . 'affiliate-press-upgrade.php' ); 
    33     update_option( 'LDB_Affiliate_Press_Version', '0.3.4' ); 
     33    update_option( 'LDB_Affiliate_Press_Version', '0.3.5' ); 
    3434    wp_schedule_event( time(), 'hourly', 'AP_cronjob' ); 
    3535} 
  • affiliate-press/trunk/includes/class-affiliate-press.php

    r532055 r532255  
    277277            $dashboard['products'] = count( get_posts( array( 'post_type' => 'product', 'post_status' => array( 'publish', 'draft' ) ) ) ); 
    278278            $dashboard['feeds'] = count( $wpdb->get_results( 'SELECT ID FROM ' . $wpdb->prefix . 'apfeeds', ARRAY_A ) ); 
    279             $dashboard['multipleprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices WHERE ' . $wpdb->prefix . 'apprices.productID = products.ID) > 1 AND post_type="product"', ARRAY_A ) ); 
    280             $dashboard['oneprice'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices WHERE ' . $wpdb->prefix . 'apprices.productID = products.ID) = 1 AND post_type="product"', ARRAY_A ) ); 
    281             $dashboard['noprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices WHERE ' . $wpdb->prefix . 'apprices.productID = products.ID) = 0 AND post_type="product"', ARRAY_A ) ); 
     279            $dashboard['multipleprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices AS prices WHERE prices.productID = products.ID AND prices.online = 1 ) > 1 AND post_type="product" AND ( post_status = "draft" OR post_status = "publish" )', ARRAY_A ) ); 
     280            $dashboard['oneprice'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices AS prices WHERE prices.productID = products.ID AND prices.online = 1 ) = 1 AND post_type="product" AND ( post_status = "draft" OR post_status = "publish" )', ARRAY_A ) ); 
     281            $dashboard['noprices'] = count( $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'posts AS products WHERE (SELECT COUNT(*) FROM ' . $wpdb->prefix . 'apprices AS prices WHERE prices.productID = products.ID AND prices.online = 1 ) = 0 AND post_type="product" AND ( post_status = "draft" OR post_status = "publish" )', ARRAY_A ) ); 
    282282            include( LDB_AP_VIEW_PATH . 'dashboard.php' ); 
    283283        } 
     
    666666            if( $data ) { 
    667667                foreach( $data as $row ){ 
    668                     $table.= '<tr><td><a href="' . $row->link . '" target="_blank">' . $row->title . '</a></td><td>' . $row->price . '</td></tr>'; 
     668                    $table.= '<tr><td><a href="' . $row->link . '" target="_blank">' . $row->title . '</a></td><td>' . $row->currency . ' ' . $row->price . '</td></tr>'; 
    669669                } 
    670670            } else { 
     
    678678        function AP_getPrices( $table = false ) { 
    679679            global $post, $wpdb; 
    680             $results = $wpdb->get_results( 'SELECT apfeeds.title, apprices.price, apprices.link FROM ' . $wpdb->prefix . 'apprices apprices, ' . $wpdb->prefix . 'apfeeds apfeeds WHERE apprices.productID = ' . $post->ID . ' AND apprices.feedID = apfeeds.ID AND apprices.online = 1 ORDER BY apprices.price ASC' ); 
     680            $results = $wpdb->get_results( 'SELECT apfeeds.title, apfeeds.currency, apprices.price, apprices.link FROM ' . $wpdb->prefix . 'apprices apprices, ' . $wpdb->prefix . 'apfeeds apfeeds WHERE apprices.productID = ' . $post->ID . ' AND apprices.feedID = apfeeds.ID AND apprices.online = 1 ORDER BY apprices.price ASC' ); 
    681681            if ( $table ) 
    682682                $results = $this->AP_buildTable( $results ); 
  • affiliate-press/trunk/readme.txt

    r532055 r532255  
    55Requires at least: 3.3 
    66Tested up to: 3.4 
    7 Stable tag: 0.3.4 
     7Stable tag: 0.3.5 
    88 
    99Affiliate Press allows you to set up an affiliate website based on product feeds as easy as 1-2-3. 
     
    5757== Changelog == 
    5858 
     59= 0.3.5 = 
     60* Confirmed that the wizard also works with tradetracker.net product feeds. 
     61* Made some changes to the way how the dashboard statistics are calculated. 
     62* Added the currency to the price table for the front-end. 
     63* Fixed some typos. 
     64 
    5965= 0.3.4 = 
    6066* Added a first version of the dashboard. 
  • affiliate-press/trunk/views/feed-add-wizard-step2.php

    r530018 r532255  
    1111                <table class="form-table"> 
    1212                    <tr> 
    13                         <th scope="row"><label for="item_xpath"><?php echo __( 'Item Xpath', 'LDB_AP' ); ?></label></th> 
    14                         <td><?php echo $item_xpath; ?><br /><span class="description"><?php echo __( 'The Xpath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
     13                        <th scope="row"><label for="item_xpath"><?php echo __( 'Item XPath', 'LDB_AP' ); ?></label></th> 
     14                        <td><?php echo $item_xpath; ?><br /><span class="description"><?php echo __( 'The XPath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
    1515                    </tr> 
    1616                </table> 
  • affiliate-press/trunk/views/feed-add-wizard-step3.php

    r530018 r532255  
    1313                <table class="form-table"> 
    1414                    <tr> 
    15                         <th scope="row"><label for="name_xpath"><?php echo __( 'Name Xpath', 'LDB_AP' ); ?></label></th> 
    16                         <td><?php echo $xpath['name']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product name.', 'LDB_AP' ); ?></span></td> 
     15                        <th scope="row"><label for="name_xpath"><?php echo __( 'Name XPath', 'LDB_AP' ); ?></label></th> 
     16                        <td><?php echo $xpath['name']; ?><br /><span class="description"><?php echo __( 'The XPath to the product name.', 'LDB_AP' ); ?></span></td> 
    1717                    </tr> 
    1818                    <tr> 
    19                         <th scope="row"><label for="image_xpath"><?php echo __( 'Image Xpath', 'LDB_AP' ); ?></label></th> 
    20                         <td><?php echo $xpath['image']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product image.', 'LDB_AP' ); ?></span></td> 
     19                        <th scope="row"><label for="image_xpath"><?php echo __( 'Image XPath', 'LDB_AP' ); ?></label></th> 
     20                        <td><?php echo $xpath['image']; ?><br /><span class="description"><?php echo __( 'The XPath to the product image.', 'LDB_AP' ); ?></span></td> 
    2121                    </tr> 
    2222                    <tr> 
    23                         <th scope="row"><label for="price_xpath"><?php echo __( 'Price Xpath', 'LDB_AP' ); ?></label></th> 
    24                         <td><?php echo $xpath['price']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product price.', 'LDB_AP' ); ?></span></td> 
     23                        <th scope="row"><label for="price_xpath"><?php echo __( 'Price XPath', 'LDB_AP' ); ?></label></th> 
     24                        <td><?php echo $xpath['price']; ?><br /><span class="description"><?php echo __( 'The XPath to the product price.', 'LDB_AP' ); ?></span></td> 
    2525                    </tr> 
    2626                    <tr> 
    27                         <th scope="row"><label for="link_xpath"><?php echo __( 'Link Xpath', 'LDB_AP' ); ?></label></th> 
    28                         <td><?php echo $xpath['link']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product link.', 'LDB_AP' ); ?></span></td> 
     27                        <th scope="row"><label for="link_xpath"><?php echo __( 'Link XPath', 'LDB_AP' ); ?></label></th> 
     28                        <td><?php echo $xpath['link']; ?><br /><span class="description"><?php echo __( 'The XPath to the product link.', 'LDB_AP' ); ?></span></td> 
    2929                    </tr> 
    3030                    <tr> 
    31                         <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier Xpath', 'LDB_AP' ); ?></label></th> 
    32                         <td><?php echo $xpath['identifier']; ?><br /><span class="description"><?php echo __( 'The Xpath to the product identifier.', 'LDB_AP' ); ?></span></td> 
     31                        <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier XPath', 'LDB_AP' ); ?></label></th> 
     32                        <td><?php echo $xpath['identifier']; ?><br /><span class="description"><?php echo __( 'The XPath to the product identifier.', 'LDB_AP' ); ?></span></td> 
    3333                    </tr> 
    3434                    <tr> 
  • affiliate-press/trunk/views/feed-add.php

    r529259 r532255  
    1919                    </tr> 
    2020                    <tr> 
    21                         <th scope="row"><label for="item_xpath"><?php echo __( 'Item Xpath', 'LDB_AP' ); ?></label></th> 
    22                         <td><input name="item_xpath" type="text" id="item_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
     21                        <th scope="row"><label for="item_xpath"><?php echo __( 'Item XPath', 'LDB_AP' ); ?></label></th> 
     22                        <td><input name="item_xpath" type="text" id="item_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
    2323                    </tr> 
    2424                    <tr> 
    25                         <th scope="row"><label for="name_xpath"><?php echo __( 'Name Xpath', 'LDB_AP' ); ?></label></th> 
    26                         <td><input name="name_xpath" type="text" id="name_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product name.', 'LDB_AP' ); ?></span></td> 
     25                        <th scope="row"><label for="name_xpath"><?php echo __( 'Name XPath', 'LDB_AP' ); ?></label></th> 
     26                        <td><input name="name_xpath" type="text" id="name_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product name.', 'LDB_AP' ); ?></span></td> 
    2727                    </tr> 
    2828                    <tr> 
    29                         <th scope="row"><label for="image_xpath"><?php echo __( 'Image Xpath', 'LDB_AP' ); ?></label></th> 
    30                         <td><input name="image_xpath" type="text" id="image_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product image.', 'LDB_AP' ); ?></span></td> 
     29                        <th scope="row"><label for="image_xpath"><?php echo __( 'Image XPath', 'LDB_AP' ); ?></label></th> 
     30                        <td><input name="image_xpath" type="text" id="image_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product image.', 'LDB_AP' ); ?></span></td> 
    3131                    </tr> 
    3232                    <tr> 
    33                         <th scope="row"><label for="price_xpath"><?php echo __( 'Price Xpath', 'LDB_AP' ); ?></label></th> 
    34                         <td><input name="price_xpath" type="text" id="price_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product price.', 'LDB_AP' ); ?></span></td> 
     33                        <th scope="row"><label for="price_xpath"><?php echo __( 'Price XPath', 'LDB_AP' ); ?></label></th> 
     34                        <td><input name="price_xpath" type="text" id="price_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product price.', 'LDB_AP' ); ?></span></td> 
    3535                    </tr> 
    3636                    <tr> 
    37                         <th scope="row"><label for="link_xpath"><?php echo __( 'Link Xpath', 'LDB_AP' ); ?></label></th> 
    38                         <td><input name="link_xpath" type="text" id="link_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product link.', 'LDB_AP' ); ?></span></td> 
     37                        <th scope="row"><label for="link_xpath"><?php echo __( 'Link XPath', 'LDB_AP' ); ?></label></th> 
     38                        <td><input name="link_xpath" type="text" id="link_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product link.', 'LDB_AP' ); ?></span></td> 
    3939                    </tr> 
    4040                    <tr> 
    41                         <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier Xpath', 'LDB_AP' ); ?></label></th> 
    42                         <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product identifier.', 'LDB_AP' ); ?></span></td> 
     41                        <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier XPath', 'LDB_AP' ); ?></label></th> 
     42                        <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product identifier.', 'LDB_AP' ); ?></span></td> 
    4343                    </tr> 
    4444                    <tr> 
  • affiliate-press/trunk/views/feed-edit.php

    r529259 r532255  
    2020                    </tr> 
    2121                    <tr> 
    22                         <th scope="row"><label for="item_xpath"><?php echo __( 'Item Xpath', 'LDB_AP' ); ?></label></th> 
    23                         <td><input name="item_xpath" type="text" id="item_xpath" value="<?php echo $feed['item_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
     22                        <th scope="row"><label for="item_xpath"><?php echo __( 'Item XPath', 'LDB_AP' ); ?></label></th> 
     23                        <td><input name="item_xpath" type="text" id="item_xpath" value="<?php echo $feed['item_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to a product within the feed.', 'LDB_AP' ); ?></span></td> 
    2424                    </tr> 
    2525                    <tr> 
    26                         <th scope="row"><label for="name_xpath"><?php echo __( 'Name Xpath', 'LDB_AP' ); ?></label></th> 
    27                         <td><input name="name_xpath" type="text" id="name_xpath" value="<?php echo $feed['name_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product name.', 'LDB_AP' ); ?></span></td> 
     26                        <th scope="row"><label for="name_xpath"><?php echo __( 'Name XPath', 'LDB_AP' ); ?></label></th> 
     27                        <td><input name="name_xpath" type="text" id="name_xpath" value="<?php echo $feed['name_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product name.', 'LDB_AP' ); ?></span></td> 
    2828                    </tr> 
    2929                    <tr> 
    30                         <th scope="row"><label for="image_xpath"><?php echo __( 'Image Xpath', 'LDB_AP' ); ?></label></th> 
    31                         <td><input name="image_xpath" type="text" id="image_xpath" value="<?php echo $feed['image_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product image.', 'LDB_AP' ); ?></span></td> 
     30                        <th scope="row"><label for="image_xpath"><?php echo __( 'Image XPath', 'LDB_AP' ); ?></label></th> 
     31                        <td><input name="image_xpath" type="text" id="image_xpath" value="<?php echo $feed['image_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product image.', 'LDB_AP' ); ?></span></td> 
    3232                    </tr> 
    3333                    <tr> 
    34                         <th scope="row"><label for="price_xpath"><?php echo __( 'Price Xpath', 'LDB_AP' ); ?></label></th> 
    35                         <td><input name="price_xpath" type="text" id="price_xpath" value="<?php echo $feed['price_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product price.', 'LDB_AP' ); ?></span></td> 
     34                        <th scope="row"><label for="price_xpath"><?php echo __( 'Price XPath', 'LDB_AP' ); ?></label></th> 
     35                        <td><input name="price_xpath" type="text" id="price_xpath" value="<?php echo $feed['price_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product price.', 'LDB_AP' ); ?></span></td> 
    3636                    </tr> 
    3737                    <tr> 
    38                         <th scope="row"><label for="link_xpath"><?php echo __( 'Link Xpath', 'LDB_AP' ); ?></label></th> 
    39                         <td><input name="link_xpath" type="text" id="link_xpath" value="<?php echo $feed['link_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product link.', 'LDB_AP' ); ?></span></td> 
     38                        <th scope="row"><label for="link_xpath"><?php echo __( 'Link XPath', 'LDB_AP' ); ?></label></th> 
     39                        <td><input name="link_xpath" type="text" id="link_xpath" value="<?php echo $feed['link_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product link.', 'LDB_AP' ); ?></span></td> 
    4040                    </tr> 
    4141                    <tr> 
    42                         <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier Xpath', 'LDB_AP' ); ?></label></th> 
    43                         <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="<?php echo $feed['identifier_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The Xpath to the product identifier.', 'LDB_AP' ); ?></span></td> 
     42                        <th scope="row"><label for="identifier_xpath"><?php echo __( 'Identifier XPath', 'LDB_AP' ); ?></label></th> 
     43                        <td><input name="identifier_xpath" type="text" id="identifier_xpath" value="<?php echo $feed['identifier_xpath']; ?>" class="regular-text" /><br /><span class="description"><?php echo __( 'The XPath to the product identifier.', 'LDB_AP' ); ?></span></td> 
    4444                    </tr> 
    4545                    <tr> 
Note: See TracChangeset for help on using the changeset viewer.