Jump to content

Antonio Garcia

♥Ambassador
  • Content count

    116
  • Joined

  • Last visited

Posts posted by Antonio Garcia


  1. ok, ok. But @@wHiTeHaT, do you think that is a good idea insert CSS into a 'ht_XXX.php file?

     

    As you can see if the module has CSS endebed, then people have problems trying to add a css rule in their CSS that will be miserably overwritten with the php file (no good idea).

     

    I know, we are not working in this moment in a MVC model, but I vote to add ONLY html info in the 'ouput' funciton of the th_ class.

     

    Only to avoid issues like that. :)


  2. If you have 1000000, do you think that is a good idea create a ul list with 1000000 items instead a search form in the upper (not in the botton) of the mobile menu?

     

    If you planning to build a dep. store with 1000000 floors and you are the architec that desings it, do you put 1000000 stairs (why no?) but ALSO a LIFT because some customers will like to avoid pass for 999999999 floors climbing the stairs and deceide to click (only a click) to the 1000000 button in the lift ;)

     

    How much 'touchs' in the screen need a potential customer to find the 'zzzaeiou' category in the 'store of the 1000000'? (do you remember the toilet scene in The Party'?) :P

     

    https://www.youtube.com/watch?v=PfWvWRqrAig

     

    (9:10")


  3. @@wHiTeHaT, @@bruyndoncx: May be is time to rethink the stragegy. If you have too much subcategories, the best (and dirty) solution should be to let osc create a boostrap ul nav menu with the first level categories ONLY (may be with a '>>' sign) or show the subcateglries in large screens but not in smal ones. In mobile/tablet the category link will redirects you to index.php?cPath=X with a nice grid with the subcategories (a column in the mobile view), etc.

     

    In a mobile word you must balance content with usability. If you content is showed slowly or can't fit the content of the litle screen, then you must found the way to reduce content.

     

    If you need a megamenu in your laptop, you must change/reduce/change with a reduced version. Same when you have a link with a icon in medium screen and you pun only the icon in mobile wiev.

     

    I would like to show 50 thumbnails in my index page but all of we know that nobody of us will try these kind of scenarios :thumbsup:

     

    http://www.zemanta.com/blog/7-tips-for-creating-user-friendly-mobile-content/


  4. umh!

     

     

    Acording a navbar submenu for categories :

     

    What about try to use a 'bootstrap' solution?

     

    First, a clever solution (not tested):

     

    http://notebook.gaslampmedia.com/multilevel-dropdown-menus-bootstrap-3-x/

     

    Second, a few examples (need of extra css / js but...):

     

    http://www.bootply.com/z4OHNrJXT5

     

    http://www.jeffmould.com/2014/01/09/responsive-multi-level-bootstrap-menu/

     

    https://processwire.com/talk/topic/5680-bootstrap-3-navigation-with-multiple-leveltier-fix/

     

    http://jsfiddle.net/chirayu45/YXkUT/16/

     

    By the way, there are someone htere that are thinking that is a good idea to have, let me see, 127 categories with 50 subcategories each and 15 sub-subcategories each-each?

     

    Remember, bootstrap 3 is designed to be 'mobile first'... so first we need to think in the 'mobile' requeriments and later see your beautifull web into your 42" screen. :lol:

     

    @@bruyndoncx: Why is slow your solution? Only when you see it into a smartphone or may be into your tablet? Can you suspect that is a issue of the OS or may be the CSS solution? May be a rendering problem with the transitions?


  5. Dear Joshua (or someone that are able to oppeing it):

     

    May you update into

    MultiGeoZone MultiTable Shipping v1.100 in a zip format insead the tar one?

     

    I can't open the tar version.

     

    I work in windows XP. not MAC.

     

    All the best.

     

    Antonio

     

     

    Found a older version of the tar file that I can open.

     

    It seems that in the last changes of the osCommerce website this file become corrupt.

     

    I post in MultiGeoZone MultiTable Shipping v1.100 (zip) the zip version.

     

    No other changes. Only re-packaging into a zip file.

     

    Antonio


  6. Good on you chooch as this time the problem is not you or your code,

    the addon by Antonio Garcia for this part is fully buged, the problem you refering to can be solved by removing the number_format but other problem is still there.

    The code written by Antonio Garcia  dose NOT respact the exact amout only the maximum points allowed there for when the exact amount is set to on the code will show customer the wrong max points allowed.

    For the time been the best thing for you to do is NOT to use Antonio Garcia's code untill he work this out. as a metter of fact you must remove this code as it gives your customers wrong guidenes.

    As for Antonio Garcia , he took alot of time and efford putting that piece of code together but  :'(  writing the code is not a big deal as mainting it and checking it again and again and again before posting to public

     

    Dear Chooch:

     

    First at all, thanks for the trying of the code. Sorry if you have problems, because I have no problems... but I will try to help you.

     

    You says:

    i have checked the configuration and all is correct, but what code is generating this number '2'?

     

    First you will try to find 'where is the 2.00 coming from'.

     

    You must go to confituration/Points/Rewards 1.50:

     

    1.- 'If you whish to limit points to be use per order, set points Max' : Do You have in this field 2.000 or 2.00 or 2.0 ? . If not, please inform me what is the 'exact' value you have.

     

    May be you try to set to 2000 points (two thousands) but if you put 2.000 you really put 2 (two).

     

    I don't kow if you have this issue, if not, please infor me.

     

    The best way to try to find the mistake I found in this moment, is 'echoing' in this page (checkout_paytment.php) the values of some variables to see what is going...

     

    To do this, goto checkout_paytment.php:

     

    1.- Find:

     

    <td class="main" width="100%" colspan="3"><?php printf(TEXT_REDEEM_SYSTEM_TOTAL, $currencies->format($order->info['total']), number_format($max_points_to_spend,2)); ?></td>

        <td><?php echo  tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

     

    ... and replace with:

     

    <td class="main" width="100%" colspan="3"><?php printf(TEXT_REDEEM_SYSTEM_TOTAL, $currencies->format($order->info['total']), number_format($max_points_to_spend,2)); ?></td>

        <!-- <td><?php echo // tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> -->

        <td class="main" ><?php echo 'points that we need to spend in this purchase (theoretly) = ' .tep_round($order->info['total']/REDEEM_POINT_VALUE, 2) . '<br>' .

            'max points allow per order (set in admin) = ' . tep_round(POINTS_MAX_VALUE,2) . '<br>' .

            'max points allowed to spend in this order if the customers are enough points = ' . tep_round($max_points_to_spend, 2) . '<bn>' .

            'the customers have this points to spend (depending the admin sets...)= ' . tep_round($customer_shopping_points, 2);

          ?></td>

     

     

    2.- Now, goto your page and try to make a new order and see the values you get...

     

     

    The values that we need know to allow or not an atmount of point so be used are:

     

    'points that we need to spend in this purchase (theoretly) =' The value (in points) that (if the admin allows) the customers must redem to pay the purchase.

     

    'max points allow per order (set in admin) = ' The value you put into the configuration. If you put 2.000 you will see '2.00' (WRONG VALUE, because the function tep_round() must return 2, not 2.00).

     

    'max points allowed to spend in this order if the customers are enough points = ' This is the value that the script calculates. Also if you see an value of '2.00' insead 2, it seems that yo write a wrong value into configuration.

     

    'the customers have this points to spend (depending the admin sets...)= ' Are the points that the customers are gain into our account. For example if he have 1500.00 points it must show 1500, not 1500.00 or if he have 555.10, you must see 555.1....

     

    I check this issue puting a wrong value into admin and If I put 2.000 insead 2000 I get the same values that you get...

     

    Sou I suggest to put the values of points WITHOUT '.' AND ',' to avoid problems...

     

    Hope, this will help you.

     

    If not, please inform me the values you put into the configuration and re-check if the changes of code I suggest are the same you have in your pages.

     

    And finally, concerning number_format() versus tep_round() functions I suggest you see at Tax Proposal into the documentation of osCommerce where you can see IN THE BOTTON of this page the problems tha sometimes you will get with number_format().

     

    If you feel that you have problems with this fuction, please change all number_format() with tep_round().

     

    All the best.

     

    Antonio

    diskpol


  7. I have exactly the same problem and it drives me crazy.

     

    Using tables in emails and newsletters causes large white areas before the table. It looks nice just before you hit the 'send email' button, but when it arrives in your mailbox its very long and stretched.

     

    What's wrong, please somebody help? I'm ashamed to send this to my customers, but right now I have to...

     

    Hello, I found the solution of 'long and stretched' newsletters...

     

    Please see in this forum Solution for stretched newsletters

     

    I found a solution for the newsletter in oscommerc. If you want include a sheet in the newsletter, you have a problem.

     

    You can solve it by that :

     

    function add_html($html, $text = NULL, $images_dir = NULL) {

    ############### Changed "################

    // $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html);

    $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), ' ',$html);

    // $this->html = $html;

    // ############## End changed ###########

     

    I hope it helps.

     

    Antonio


  8. Antonio

     

    you didn't understand what i was trying to state...

     

    the latest version with update that Deep-Silver has made available does not include an update that he did not make, but this update is available as a download too.

     

    i was trying to fairly state that there is a chance that if the script is modified and updated by Deep-Silver then he will no doubt help us when we have problems as he knows the code inside out...

     

    but maybe he won't if other people do it - that's all

     

    I hope you have success in coding for this forum

     

    Aleem

     

    Dear Aleem:

     

    Thanks again for your words.

     

    Are you thinking that if you have some question about the code I put here, I will be unable to answer you?

     

    Remember my 2 post make as 'cosmetical' as 'small' as (I hope) ussefull improvements in 2 files:

     

    One is interesting for the customer: They knows the points that he are allow to spend (depending the Total Order that ALSO IS SOWHED in this file. A question asked in this forum).

     

    The other may filter the Customers Shiping Points depending the status value. If you are into customers_points_pending.php with 100 orders with different 'Point Status' it will be a little hard to admin this.

     

    Also, whith my code, you may discover if one order labeled 'In Process' is really 'confirmed' or 'Pending'. Even it should be a good chance for people (people that are asking in this forum, sometimes without answer, sometimes with bad code as I put some days ago...) that wants a way to put 'Confirmed' fast (and as Deep-Silver advise, dangerous).

     

    I understand your point of view, but I'm sorry, I can't disturb anybody with my propolsals.

     

    I hope nobody use it, because I find no response about this (the code may be is wrong or not interesting).

     

    So, don't worry. Mo more propolsals.

     

    I will keept waching....

     

    All the best.

     

    Antonio


  9. hi

     

    it is very nice of you to add improvements on this fantastic module created by Deep-silver but i don't think it is appropriate at the moment because it seems as though he is the sole author of the original code and if we start to add bits of other codes, it may clash when we add more contributions/upgrades from Deep-Silver

     

    I think the best thing to do is to put a request here like everyone else and wiat for Deep-Silver to decide whether he wants to do the modification or not...

     

    ... at least to get his permission before posting code hre

     

    thanks

     

    Dear Aleem:

     

    Thanks for your glad works.

     

    I read the GNU License and each of the files of deep-silver (good as interesing) contribution and I can't find no place where he sais: Warning! I don't need your help! It's my contribution and nobody can contribute update/modify it.

     

    The two modif. I suggest are small pieces of code that you may put / check / and erase in a few minutes.

     

    They don't change the filosophy of the mod and may be these would be cataloged as 'trying to improve theyr functionality'.

     

    These are changes I made to my own future web and only I try to share with other people (code == time).

     

    I have no time and DON'T WANT to make a new contribution with the same name of the deep-silver with only a few changes. But I was thinking that this forum whould be the good place to write these ideas.

     

    May be they are wrong (it is possible!), not interesting (well, at least to one person it's interesting... yes - mime! :blush: ) and may be confusing (My English level is so low as my PHP level...).

     

    Sorry if I disturb to you with these ideas. I think that ALL the osCommerce code is the work of a few people, a lot other other suggest and another few make the improvements / changes.

     

    Until now I was a 'suggesting people' and now I try to colaborate and help (in my limited knoledge...).

     

    For example, as you can suspect, I'm Spanish and I had contacted with deep-silver to offers also a spanish traslation of the files. It seems that he are interesting in this... and also he's so polite to don't critice our posts (well, may be they are not interested or have no time to spend his time reading it).

     

    If this code is good for someone. Perfect!

     

    If there are some mistakes, please perdon, perdon perdon! (contact with me or write in the forun. I think, share our questions is so important that show our knoledge).

     

    If this code is not interesting. Sorry again!

     

    Why not test this code and says?

    Antonio, it don't work and only must read forums....

    ... or Don't think it's interesting!

    ... or It's good, but I suggest best this code...!

     

    Well. I think you are the freedom to says all you want. Sorry again if my post disturb you.

     

    May be you are right and I don't must go out of the 'suggesting people'.

     

    Antonio


  10. Sorry...

     

    I found a mistake in step 2:

     

    You should do this insead the step 2 of the last post :

     

    2.- find (arround line 378):

     

                       <td class="main" ><?php echo TEXT_REDEEM_SYSTEM_SPENDING . '  ' .tep_draw_input_field('customer_shopping_points_spending', $customer_shopping_points_spending , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"'); ?><br><?php echo TEXT_REDEEM_SYSTEM_SPENDING_ALL; ?></td>
                      <td class="main" align="right"><br><?php echo tep_draw_checkbox_field('customer_shopping_points_spending', $customer_shopping_points); ?></td>

     

    ... and replace with:

     

                       <td class="main" ><?php echo TEXT_REDEEM_SYSTEM_SPENDING . '  ' .tep_draw_input_field('customer_shopping_points_spending', $customer_shopping_points_spending , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"'); ?>
       <?php
       if (tep_round($order->info['total']/REDEEM_POINT_VALUE,2) > tep_round($customer_shopping_points,2) && tep_round($customer_shopping_points,2) <= POINTS_MAX_VALUE) {      
         echo '<br><br>' . TEXT_REDEEM_SYSTEM_SPENDING_ALL . '   ' . tep_draw_checkbox_field('customer_shopping_points_spending', $customer_shopping_points) . '</td>';
       }
       ?>

     

     

    Sorry for my mistake....

     

    All the best.

     

    Antonio


  11. .... and another change I made into my files that should be interesting (I hope) to all...

     

    Somebody ask to inform the customer, into the checkout proccess of the order, the atmount of points that should be able to spend in this order.

     

    I write some code to show this info in checkout_paytmen.php.

     

    To know that into the catalog/checkout_payment.php should show the info with the 'total of the order' and the points allowed to spend.

     

    The code must check if the customer have enough points aproved to spend in the order or/and if there are some 'points limitation per order' (value in POINTS_MAX_VALUE). So the code will show the points max allowed to spend in this order.

     

    I hope the logic written will be right and good (if someone detect some errors, please report it!).

     

    Also, I added the possibility of hidden automaticly or not the check box that says 'Or tick here to use all available points balance(only if less then order total value' depending if the points to spend are less than the total value (in points) of the order.

     

    From now this ckeckbox will be showed only if the points to spend are less than the value of points of the order...

     

    ?Vamos a ello! (let's we go!)

     

    In file catalog/checkout_payment.php:

     

    1.- find (around line 358):

     

                    <td class="main" width="100%" colspan="3"><?php echo TEXT_REDEEM_SYSTEM_START . number_format($customer_shopping_points,2) . TEXT_REDEEM_SYSTEM_MIDDLE . $currencies->format(tep_calc_shopping_pvalue($customer_shopping_points)) . '.'; ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>

     

    and replace with:

     

                    <td class="main" width="100%" colspan="3"><?php echo TEXT_REDEEM_SYSTEM_START . number_format($customer_shopping_points,2) . TEXT_REDEEM_SYSTEM_MIDDLE . $currencies->format(tep_calc_shopping_pvalue($customer_shopping_points)) . '.'; ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
        <tr>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
       <?php
      	 // calculate the max point allowed to charge in this order
      	 $max_points_to_spend = 0;
         $max_points_to_spend = ($order->info['total']/REDEEM_POINT_VALUE > POINTS_MAX_VALUE ? POINTS_MAX_VALUE : $order->info['total']/REDEEM_POINT_VALUE);
      	 $max_points_to_spend = (number_format($customer_shopping_points,2) > $max_points_to_spend ? $max_points_to_spend : number_format($customer_shopping_points,2));
       ?>
                   <td class="main" width="100%" colspan="3"><?php printf(TEXT_REDEEM_SYSTEM_TOTAL, $currencies->format($order->info['total']), number_format($max_points_to_spend,2)); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>

     

    2.- find (arround line 378):

     

                        <td class="main" ><?php echo TEXT_REDEEM_SYSTEM_SPENDING . '  ' .tep_draw_input_field('customer_shopping_points_spending', $customer_shopping_points_spending , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"'); ?><br><?php echo TEXT_REDEEM_SYSTEM_SPENDING_ALL; ?></td>
                       <td class="main" align="right"><br><?php echo tep_draw_checkbox_field('customer_shopping_points_spending', $customer_shopping_points); ?></td>

     

    ... and replace with:

     

                        <td class="main" ><?php echo TEXT_REDEEM_SYSTEM_SPENDING . '  ' .tep_draw_input_field('customer_shopping_points_spending', $customer_shopping_points_spending , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"'); ?>
      	 <?php
      	 if ($order->info['total']/REDEEM_POINT_VALUE > $max_points_to_spend) {      
          echo '<br><br>' . TEXT_REDEEM_SYSTEM_SPENDING_ALL . '   ' . tep_draw_checkbox_field('customer_shopping_points_spending', $customer_shopping_points) . '</td>';
      	 }
      	 ?>

     

    and finally going to the language file (admin/includes/languages/english/checkout_paytmen.php)

     

    3.- Add into this file find:

     

    define('TEXT_REDEEM_SYSTEM_MIDDLE', ' Shopping points with total worth ');

     

    and change with:

     

    define('TEXT_REDEEM_SYSTEM_MIDDLE', ' Shopping points with total worth ');
    // new
    define('TEXT_REDEEM_SYSTEM_TOTAL', 'The amount of the purchase is: %s<br>(You are allow to use until  %s points in this order)');
    // new

     

    I will be happy if someone help this code and also the code are all right. If not, please I beg your pardon... and inform us the bugs found (I should change into our page... :thumbsup: )

     

    All the best.

     

    Antonio


  12. Well... do you want a speed up in the 'Confirming Process'?

     

    I change/added some code to try to get it.

     

    Into the file admin/customers_points_pending.php I added a dropdown list to filter all the records in 'View all', 'Show only Pending', 'Show Confirmed' and 'Show all Canceled'.

     

    So you are able to see all the orders you may confirm or not.

     

    If you want confirm all orders 'Pending' you only need to change this dropdown to 'Pending', so all the rows showed will be orders with a Point Status of 'Pending'.

     

    In only two clicks (button 'Confirm Points' and then button 'Confirm Points' again) you will be able to change to 'Points Confirmed'. But also remember the warnings exposed in last post, so re-check every order to confirm his points....

     

    ok, we start (go to file admin/customers_points_pending.php . Ver. Points & Gift Voucher fixed (12-sep-2005)):

     

    1.- find (arround line 17 find):

     

    $currencies = new currencies();

     

    and change with:

     

    $currencies = new currencies();
    
     // drop-down filter array
     $filter_selection_array = array(	array('id' => '0', 'text' => TEXT_ALL_ORDERS),	
              	 array('id' => '1', 'text' => TEXT_POINTS_PENDING),
            	 array('id' => '2', 'text' => TEXT_POINTS_CONFIRMED),
            	 array('id' => '3', 'text' => TEXT_POINTS_CANCELLED));

     

    2.- find (arroun line 273):

     

                <td class="smalltext" align="right"><?php echo ' <b> ' . HEADING_RATE . ' </b>    ' .  HEADING_AWARDS . $currencies->format(1) . ' = ' . number_format(POINTS_PER_AMOUNT_PURCHASE,2) .'  ' . HEADING_POINTS .'    ' . HEADING_REDEEM  .  number_format(POINTS_PER_AMOUNT_PURCHASE,2)  .'  ' . HEADING_POINTS .' = ' . $currencies->format(POINTS_PER_AMOUNT_PURCHASE * REDEEM_POINT_VALUE); ?></td>
               <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
                 <tr></tr>
                 <tr></tr>            
               </table></td>
             </tr>
           </table></td>

     

    ... replace with:

     

                <td class="smalltext" align="right"><?php echo ' <b> ' . HEADING_RATE . ' </b>    ' .  HEADING_AWARDS . $currencies->format(1) . ' = ' . number_format(POINTS_PER_AMOUNT_PURCHASE,2) .'  ' . HEADING_POINTS .'    ' . HEADING_REDEEM  .  number_format(POINTS_PER_AMOUNT_PURCHASE,2)  .'  ' . HEADING_POINTS .' = ' . $currencies->format(POINTS_PER_AMOUNT_PURCHASE * REDEEM_POINT_VALUE); ?></td>
             </tr>
       <tr><?php echo tep_draw_form('status', FILENAME_CUSTOMERS_POINTS_PENDING, '', 'get'); ?>
      	 <td colspan="3" class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' .  tep_draw_pull_down_menu('filter_selection', $filter_selection_array, '', 'onChange="this.form.submit();"'); ?></td>
       </form></tr>
           </table></td>

     

    3.- find code (arround line 295):

     

    <?php
       $orders_query_raw = "select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status from " . TABLE_ORDERS . " o , " . TABLE_ORDERS_TOTAL . " ot , " . TABLE_ORDERS_STATUS . " s , customers_points_pending cpp where ot.class = 'ot_total' and cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by o.orders_id DESC";

     

    and replace with:

     

    <?php
    $filter_selection = $HTTP_GET_VARS['filter_selection'];
     switch ($filter_selection) {
         case '0': // all orders
        $filter_selection =  '';
        break;
      case '1': // status == 1 (pending)
        $filter_selection =  " and cpp.status = '1' ";
        break;
        case '2': // status == 2 (confirmed)
        $filter_selection =  " and cpp.status = '2' ";
        break;
      case '3': // status == 2 (canceled)
        $filter_selection =  " and cpp.status = '3' ";
        break;
        }
    
       $orders_query_raw = "select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status from " . TABLE_ORDERS . " o , " . TABLE_ORDERS_TOTAL . " ot , " . TABLE_ORDERS_STATUS . " s , customers_points_pending cpp where ot.class = 'ot_total' " . $filter_selection . "and cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by o.orders_id DESC";

     

    4.- And last add some code into your language file. Goto file admin/includes/languages/english/customers_points_pending.php and ADD (for example, below 'define('HEADING_POINTS', 'points');'

     

    define('HEADING_TITLE_STATUS', 'Status:');
    
    define('TEXT_ALL_ORDERS', 'Show All');

     

    I hope all the code is right and ussefull to all. If the autor of this interesting contribution want to add, perfect!

     

    If you feel that something is wrong and/or missing, please put a post in this forum.

     

    All the best.

     

    Antonio


  13. SOLVED!!! ofcourse this was my error, didnt properly insert step 2 in admin.

     

    still have these few questions:

    1. Is it possible for the points to be auto accepted, so no admin confirmation is needed.

    2. Can i give the points an expiry date (lets say 6 months)?

    3. How can i add to welcome text: you have X points in your account?

     

    Thanks again for this great contribution,

    alt.

     

    Dear Altenter:

     

    1. Is it possible for the points to be auto accepted, so no admin confirmation is needed.

    Reading the code, I found that into catalog/includes/functions/redemptions.php the function that makes 'Pending' the points are the 'tep_add_pending_points($customer_id, $insert_id, $points_toadd)'. If you change:

     

    'status' => 1);

     

    to

     

    'status' => 2);

     

    you get 'Confirmed' the points.

     

    2. Can i give the points an expiry date (lets say 6 months)?

    Yes. The easyest way I know is, going into admin/customers_points_pending.php, and then press 'cancel points' with orders older than 6 months.

     

    If you want to make a automatic update you may do also but only if you don't delete no records into table 'customers_points_pending'. Remember that the total of points of each customers is into table 'customers' but the only way to know the story of all the points rewards/delete/redeemed are checking table 'customers_points_pending'.

    If you delete a record in this table, not necesary delete points to table 'customers'.

     

     

    My MySQL level is not so high, but you should do:

     

    1.- Make a SQL query to show all records of 'customers_points_pending' older than 6 months.

     

    2.- For each record see the value of the 'points_pending' field and add / delete from field 'customers_shopping_points'.

     

     

    Sorry my bad English.... but I hope it may help a little.

     

    Antonio


  14. May somebody explain how change the points status into 'customers_points_pending.php to 'Redeemed'?

     

    Please forgive my questions.

     

    I found the mistake (I donwloaded a older version with a checkout_process.php with wrong code....).

     

    Solved. The Redeemption is into this file (arround line 107):

     

    #### Points/Rewards Module V1.50 balance customer points BOF ####
    // customer shoppping points account balanced 
     if (USE_REDEEM_SYSTEM == 'true' && $customer_shopping_points_spending) {
       $customer_shopping_points = tep_get_shopping_points();
         tep_set_shopping_points(($customer_shopping_points - $customer_shopping_points_spending), $customer_id);
       if ($customer_shopping_points_spending && DISPLAY_POINTS_REDEEMED == 'true') {
         tep_add_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending);
       } 
     }

     

    The function 'tep_add_redeemed_points' is the one with make the changes into the database...

     

    Sorry for all.

     

    Antonio


  15. May somebody explain how change the points status into 'customers_points_pending.php to 'Redeemed'?

     

    Concerning my last post, I think, we must find some code into the admin files to change into the database 'customers_points_pending' the field 'status' to a value of '4' ( '4' == Redeemed Status). :unsure:

     

    I can't find no '4' inside the files customers_points.php and customers_points_pending.php (Well, no coding -sql query- to change the value of this field).

     

    Any ideas?

     

    Antonio


  16. May somebody explain how change the points status into 'customers_points_pending.php to 'Redeemed'?

     

    If the 'Points Status' is 'Pending' I see that I may press the following buttons:

     

    * 'confirm' (change the status from 'pending' to 'confirmed').

    * 'cancel' (cancel points in this order)

    * 'ajust' (set the points we like, not necesary the points gain in this order)

    * 'delete' (delete this record from the database = no points to this order)

    * 'mail' (I hope to send mail with the status point of this order).

     

    If the 'Points Status' is 'Processing' I see that I may press the following buttos:

     

    * 'roll back (to change from 'Confirmed' to 'Pending' status)

    * 'delete' (delete this record from the database.

    * 'mail' (I hope to send mail with the status point of this order).

     

    As you can see there are no button to 'Redeem' the 'confirmed' or 'Pending' points.

     

    Also try to see into customers_points.php but, I think, only can 'add', 'delete', 'adjust' and 'goto orders' buttos...

     

    I know that is a silly question, but I can't find where learn/read it...

     

    All the best.

     

    Antonio


  17. anybody found the answer to why the totals don't work for some of us ?

    cheers

    shaun

     

    Try fo find this code into admin/moectoe_edit_order.php

     

    } } elseif (($new_ot_total) && (in_array($order_totals[$i]['code'], $allowed_ot_totals))) {
                   $new_order_totals[] = array('title' => ((($order_totals[$i]['code'] == 'ot_tax') && (($order_totals[$i]['title'] == '' || ':'))) ? 'Tax:' : $order_totals[$i]['title']),
                                               'text' => $order_totals[$i]['text'],
                                               'value' => $order_totals[$i]['value'],
                                               'code' => $order_totals[$i]['code'],
                                               'sort_order' => $j);
                   $current_ot_totals_array[] = $order_totals[$i]['code'];
                   $j++;
                  echo $order_totals[$i]['code'] . "<br>";

     

    ... and uncoment the last line. So it should be as:

     

    } elseif (($new_ot_total) && (in_array($order_totals[$i]['code'], $allowed_ot_totals))) {
                   $new_order_totals[] = array('title' => ((($order_totals[$i]['code'] == 'ot_tax') && (($order_totals[$i]['title'] == '' || ':'))) ? 'Tax:' : $order_totals[$i]['title']),
                                               'text' => $order_totals[$i]['text'],
                                               'value' => $order_totals[$i]['value'],
                                               'code' => $order_totals[$i]['code'],
                                               'sort_order' => $j);
                   $current_ot_totals_array[] = $order_totals[$i]['code'];
                   $j++;
                   // COMMENTED OUT echo $order_totals[$i]['code'] . "<br>";

     

    If you have problems, try checking into the configuration menu into admin, then 'MOECTOE Suite' that you have the order totals that you need instaled.

     

    Remember that MOECTOE says into this point: 'Subtotal, Shipping, and Total are required'.

     

    all the best.

     

    antonio

×