Results 1 to 10 of 363

Threaded View

  1. #11
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

    Quote Originally Posted by izar74 View Post
    Dunno if this could help, i'm still trying to figure it out, but Diva's mumbling made me mumble a lot .. so i found this kind of solution...

    I modified the code:

    PHP Code:
    <?php
        
    for ($i 0$n sizeof($order->totals); $i $n$i++) {
          echo 
    '              <tr>' "\n" .
               
    '                <td align="right" class="'str_replace('_''-'$order->totals[$i]['class']) . '-Text">' $order->totals[$i]['title'] . '</td>' "\n" .
               
    '                <td align="right" class="'str_replace('_''-'$order->totals[$i]['class']) . '-Amount">' $currencies->format($order->totals[$i]['value'], false) . '</td>' "\n" .
               
    '              </tr>' "\n";
        }
    ?>
    With:

    PHP Code:
    <?php
        
    for ($i 0$n sizeof($order->totals); $i $n$i++) {
          if (
    $order_total['class'] = "ot_reward_points_display") {
          echo 
    '              <tr>' "\n" .
               
    '                <td align="right" class="'str_replace('_''-'$order->totals[$i]['class']) . '-Text">' $order->totals[$i]['title'] . '</td>' "\n" .
               
    '                <td align="right" class="'str_replace('_''-'$order->totals[$i]['class']) . '-Amount">' $order->totals[$i]['text'] . '</td>' "\n" .
               
    '              </tr>' "\n";
           } else {
                echo 
    '              <tr>' "\n" .
               
    '                <td align="right" class="'str_replace('_''-'$order->totals[$i]['class']) . '-Text">' $order->totals[$i]['title'] . '</td>' "\n" .
               
    '                <td align="right" class="'str_replace('_''-'$order->totals[$i]['class']) . '-Amount">' $currencies->format($order->totals[$i]['value'], false) . '</td>' "\n" .
               
    '              </tr>' "\n";
               }
        }
    ?>
    It seem to work... still testing
    Ahhhh at last!! Something which appears to be the RIGHT solution.. as opposed to the bandaid solution that the current code contains.. and yes.. I'll admit that I was indeed grumbling about this.. The "solution" that made it's way into the current Reward Points code IMHO should NEVER have been implemented as it solves one issue, while creating another..

    So does this now show the Rewards Points WITHOUT a currency symbol while showing all other order totals WITH the currency symbol still in place??
    Last edited by DivaVocals; 2 Apr 2015 at 03:17 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. First 1.0 Release of Reward Points module [Support Thread]
    By hem in forum All Other Contributions/Addons
    Replies: 38
    Last Post: 4 Apr 2013, 02:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR