Ejemplo n.º 1
0
 private function tab_generalinfo()
 {
     $upgrades_api = wpbdp_listing_upgrades_api();
     echo '<strong>' . _x('General Info', 'admin infometabox', 'WPBDM') . '</strong>';
     echo '<dl>';
     echo '<dt>' . _x('Total Listing Cost', 'admin infometabox', 'WPBDM') . '</dt>';
     echo '<dd>' . wpbdp_format_currency($this->listing->get_total_cost()) . '</dd>';
     echo '<dt>' . _x('Payment Status', 'admin infometabox', 'WPBDM') . '</dt>';
     echo '<dd>';
     echo sprintf('<span class="tag paymentstatus %1$s">%1$s</span>', $this->listing->get_payment_status());
     echo '</dd>';
     echo '<dt>' . _x('Featured (Sticky) Status', 'admin infometabox', 'WPBDM') . '</dt>';
     echo '<dd>';
     // sticky information
     $sticky_info = $upgrades_api->get_info($this->listing->get_id());
     echo '<span><b>';
     if ($sticky_info->pending) {
         echo _x('Pending Upgrade', 'admin metabox', 'WPBDM');
     } else {
         echo esc_attr($sticky_info->level->name);
     }
     echo '</b> </span><br />';
     if (current_user_can('administrator')) {
         if ($sticky_info->upgradeable) {
             echo sprintf('<span><a href="%s">%s</a></span>', esc_url(add_query_arg(array('wpbdmaction' => 'changesticky', 'u' => $sticky_info->upgrade->id, 'post' => $this->listing->get_id()))), '<b>↑</b> ' . sprintf(__('Upgrade to %s', 'WPBDM'), esc_attr($sticky_info->upgrade->name)));
         }
         if ($sticky_info->downgradeable) {
             echo '<br />';
             echo sprintf('<span><a href="%s">%s</a></span>', esc_url(add_query_arg(array('wpbdmaction' => 'changesticky', 'u' => $sticky_info->downgrade->id, 'post' => $this->listing->get_id()))), '<b>↓</b> ' . sprintf(__('Downgrade to %s', 'WPBDM'), esc_attr($sticky_info->downgrade->name)));
         }
     }
     $import_id = get_post_meta($this->listing->get_id(), '_wpbdp[import_sequence_id]', true);
     if (current_user_can('administrator') && $import_id) {
         echo '<dt>' . _x('CSV Import Sequence ID', 'admin infometabox', 'WPBDM') . '</dt>';
         echo '<dd>' . $import_id . '</dd>';
     }
     echo '</dd>';
     do_action('wpbdp_admin_metabox_generalinfo_list', $this->listing->get_id());
     echo '</dl>';
     if (current_user_can('administrator') && 'ok' != $this->listing->get_payment_status()) {
         echo sprintf('<a href="%s" class="button-primary">%s</a> ', esc_url(add_query_arg('wpbdmaction', 'setaspaid')), _x('Mark listing as Paid', 'admin infometabox', 'WPBDM'));
     }
     echo wpbdp_render_page(WPBDP_PATH . 'admin/templates/listing-metabox-feesummary.tpl.php', array('categories' => $this->listing->get_categories('all'), 'listing' => $this->listing));
 }
        <dl>
            <dt><?php 
echo _ex('Created on', 'admin payments', 'WPBDM');
?>
</dt>
            <dd><?php 
echo $payment->get_created_on();
?>
</dd>

            <dt><?php 
_ex('Amount', 'admin infometabox', 'WPBDM');
?>
</dt>
            <dd><?php 
echo wpbdp_format_currency($payment->get_total(), 2, $payment->get_currency_code());
?>
</dd>            

            <dt><?php 
_ex('Gateway', 'admin infometabox', 'WPBDM');
?>
</dt>
            <dd><?php 
echo $payment->get_gateway() ? $payment->get_gateway() : '–';
?>
</dd>

            <?php 
if ($payment->has_been_processed()) {
    ?>
Ejemplo n.º 3
0
foreach ($payment->get_items() as $item) {
    ?>
        <tr class="item <?php 
    echo $item->item_type;
    ?>
">
            <td><?php 
    print esc_html($item->description);
    ?>
</td>
            <td><?php 
    echo wpbdp_format_currency($item->amount);
    ?>
</td>
        </tr>
        <?php 
}
?>
    </tbody>
    <tfoot>
        <tr>
            <th><?php 
_ex('Total', 'payment_items', 'WPBDM');
?>
</th>
            <td class="total"><?php 
echo wpbdp_format_currency($payment->get_total());
?>
        </tr>
    </tfoot>
</table>
_ex('Name:', 'manage recurring', 'WPBDM');
?>
        </dt>
        <dd>
            <?php 
echo $subscription->fee->label;
?>
        </dd>
        <dt>
            <?php 
_ex('Cost:', 'manage recurring', 'WPBDM');
?>
        </dt>
        <dd>
            <?php 
printf(_x('%s every %s days.', 'manage recurring', 'WPBDM'), wpbdp_format_currency($subscription->fee->amount), $subscription->fee_days);
?>
        </dd>
        <!--<dt>
            <?php 
_ex('Number of images:', 'manage recurring', 'WPBDM');
?>
        </dt>
        <dd>
            <?php 
echo $subscription->fee_images;
?>
        </dd>-->
        <dt>
            <?php 
_ex('Expires on:', 'manage recurring', 'WPBDM');
" class="button choose-this">
                    <?php 
        _ex('Use this fee', 'admin listing fee', 'WPBDM');
        ?>
                </a>
            <?php 
    }
    ?>

            <strong><?php 
    echo $f->label;
    ?>
</strong><br />
            <div class="details">
                <?php 
    echo wpbdp_format_currency($f->amount);
    ?>
 &#149;
                <?php 
    echo sprintf(_nx('%d image', '%d images', $f->images, 'admin infometabox', 'WPBDM'), $f->images);
    ?>
 &#149;
                <?php 
    if ($f->days == 0) {
        ?>
                    <?php 
        _ex('Listing never expires', 'admin infometabox', 'WPBDM');
        ?>
                <?php 
    } else {
        ?>
Ejemplo n.º 6
0
 protected function column_amount($item)
 {
     return wpbdp_format_currency($item->amount);
 }
        ?>
            <?php 
    }
    ?>
</b>
        </td>
        <td class="subscription-details">
        <?php 
    foreach ($subscriptions as $s) {
        ?>
            <b><?php 
        echo $s->fee->label;
        ?>
:</b><br />
            <?php 
        printf(_x('%s each %s days. Next renewal is on %s.', 'manage recurring', 'WPBDM'), wpbdp_format_currency($s->fee->amount), '<i>' . $s->fee_days . '</i>', '<i>' . date_i18n(get_option('date_format'), strtotime($s->expires_on)) . '</i>');
        ?>
<br />
            <a href="<?php 
        echo esc_url(add_query_arg('cancel', $listing->get_renewal_hash($s->term_id)));
        ?>
" class="cancel-subscription"><?php 
        _ex('Cancel recurring payment', 'manage recurring', 'WPBDM');
        ?>
</a>
        <?php 
    }
    ?>
        </td>
    </tr>
    <?php