Jump to content

Antonio Garcia

  • Content count

  • Joined

  • Last visited

Posts posted by Antonio Garcia

  1. 22 hours ago, JcMagpie said:

    This was done just as a bit of fun to see what was involved and what could be done with Official osCommerce.


    Are you contemplating to do the same with the ADMIN area?

    If only involves 4-5 files of change & 1 hour of work, I think that I worth the task.

    I LOVE the new bootstrap 4 admin area but it need a carefully search of the duplicate code in the admin/includes and revamp with B4 all the remaining (non default) pages... and also it should be fine for Gold, Edge, Frozen, Phoenix, and the rest of the variants (as the admin is almost identical).


  2. @JcMagpie Thanks for the addon and for the work fixing the bugs found!

    @multimixer Thanks for report the issue and take your time  reading / understanding / finding bugs in the code written for others.

    @valquiria23 Gracias por tu amable optimismo! (Thanks to be positive, as always!)

    My quote:

    "Write code as if it were to be read by a psychopath who knows where you live ..."

    (Unknown for me, may be Winston Churchill, Napoleon, Einstein or may be Carl Sagan...)


  3. 17 hours ago, JcMagpie said:

    Good to see progress being made by all. I recently tested the latest offering by  @Gyakutsuki   which is already Bootstrap 4, shop and admin and it's looking very good. So looks like we will have a good selection of options to move forwared with.


    Dear JcMagpie:

    Can you supply to the rest of the mortals the link of their github ?

    If this (put a link here) 'violates' something, I would be very happy if you want send a PM with the info.

    Thanks and Happy New Year to you and the rest of the crew!!!

  4. 7 hours ago, deepsonline said:

    I am using the osCommerce 2.2-MS2 version.

    It is responsive. This is an existing store and we are using php7.0.

    .... and you modded your web with foundation, bootstrap 3, bootstrap 4, W3.CSS, material design ?

    If you used bootsrap 3, please see this link (or google it) :

    If you did all the changes from <tables> to <divs> this should be trivial for you!!


  5. 16 hours ago, raiwa said:

    You could have a look into my installation script

    Yes, I saw these scripts and also I think that they should be a good starting point.

    All these functions packed in a generic class plus another zip class that handles read/copy, etc may do the work.

    (Guau! How easy is make code whitout write it!) :laugh:

    In the other hand, I'm a 2.3 hooligan, so in the next osC football match competition I like play with the 2.3 team, with the number 4...

  6. May be I'm wrong but I think almost the 60% osC installations are 2.2.  Why they can't update? We all know why, right?

    30% 2.3, why? Some new shops with a version with an ongoing increase of goods contributions that does the life easy. The effors that some of you for adapt from 2.2 a lot of contributions confirm my suspects.

    5%  with 3.0 -> only for intrepid people

    5% with 2.4 -> only for intrepid people. Good coding but with very few contributions, I think.

    IF in 2.4 is easy to add contributions, don need this code/contribution, but 2.3 needs it as wordpress need it or magento needs it, or open cart, etc.

    A scrip that does a backup to your database is essential.

    A script that install contributions and help you to keep them updated in a easy way is also essential.... of course in the osC version that I needs...

    Shopowners want to sell products and don't think in php to much. We like to open our IDE, run our local server or our beyond compare to spend a single evening find why 'this' or 'that' code don't work...:laugh:

  7. Estimado Piernas:

    Happy with your proposal!!!

    How we can help you?

    It needs to be into core? nooooooooo if it does the  life easy to shopowners they simply use it (as they use others contrib).

    Here, as ALWAYS, we need find a place where find the instructions to make the zip an the extra files to 'order' the installation.

    My point of view:

    A contribution needs to add new files and EDIT old (core or not) files, so:

    * zip file with all the files needed from a /catalog/ dir.

    * in the root (not in catalog) a .php file that does the install. why not installer.php? You put it  the list of 'steeps' for make the installer: -check ver, files permisions, existence of files, etc but also the hooks for add/edit the new code.

    In a second step, 'We' need study the way to make a log of the orders that 'installer.php' did, may be using a variation of 'Contribution Tracker'. In a future these orders may be executed in reverse to 'unninstall' the addom.

    I suggest you that you see here:



    They do almost the 75% of the needes you listed. The only drawback is that the 'list of steps' is written BY HAND in a xml file.

    If you make a class or a sort of functions that can translate a list of human readable actions (located in an array, for example) to a xml file you will do it!

    Whe array has 'verbs' that trigger a kind of functions like that:

    $instrucctions_array = array (

      'action' => 'insertCode',    //  <-- this verb will trigger the actions listed below
     'file' =>  '/admin/customers.php',
      'line' => 56,
      'beforWhere' => '<div class="located place">,
      'codeToBeInserted' => '<p>A buen precio va el tomate</p>'


    tep_insert_in_cofiguration_table ( $paramName, array $arrayOfBeautifullParams) if needed...

    tep_insert_in_configuration_table ( $paramName, array $arrayOfBeautifullParams) if needed...







    Another suggestion: STOP adding in classes params that almost never are used. Where need we  to  know the value of MY_N_MODULE_VERSION_NUMBER ? In the modules.php page?

    If not the infinite number of define()'s will be as crazy as useless, I think)


  8. Very good entry!

    My sort reply is 'easy'.

    ...the long one:

    Watching the others alternatives of osCom that are the winners...

    https://trends.google.com/trends/explore?date=today 5-y&q=oscommerce,magento,prestashop,shopify,%2Fm%2F0xpxtgc

    - Easy installation of contributions / languages / templates. The customer upload a zip file and install it. May be the code used for update the core flies used in  2.4 may be a starting point. Also is needed to decouple core files for 'new files/folders' from app's / contributions. Isolate the core from contributions, isolate the application core from representation (templates). No more search in the branches of directories of directories of directories  from our lovely osC for add/edit/delete apps, contributions, languages files or templates files, the ussual issue when someone try to install a new contribution.

    - Easy installation, creation of templates and avoid coupling/dependency from a framework (bootstrap, jquery). Avoid insert html classes into code that works only in bootstrap. No more js into php, no more css into php, no more echo "<div class="btn"..." or class="col-", etc. If not we can't update to bootstrap 4 easily  (right, Gary?) or foundation or material desing or even try to add classes to a new template unless you search into classes or may be a page file or may be an configuration param...

    - Options/attributes: Need to rethinking how handle grouped options (a T-shirt red XL, printed in back/front), add EAN, weight, dimensions

    - Admin: Some efforts to make a responsive admin are not fully public (even unkown) for a lot of customers. It's a good news that this will be solved according the 'official roadmap'. Tables that can be sorted (customers, categories), ajax (?), a page for install contributions, etc.

    - How to handle modules: I think that the recent 'ultra' modularisation of page-components into 'modules' is good but I think someone must start thinking the best way to handle 250 modules in a easy way. The 'modules.php' must be redesigned, Piernas is doing a good try but I think that is only the first steep of a needed complete remodelation of this file. Seeing the admin side of wordpress may help us to thinking in make 'bulk changes' in params instead one by one.

    - A easy way to update database from previous versios to 2.3: Need for an 'official' script to make an automatic update from previous versions. A recurring issue for a lot of shopowners that would like to try. Yes, I know, there are a sql script, or is easy if you know that mysqladmin exist but is not the regular for a shopowner. The current oscommerce have some scripts that do something with the database but NOT an update from previous versions. If they are in core and they are almost usseless (may be someone uses it ONE time in their entire life) why not add another script of the same  nature?

    - Try to make parallel programing to avoid drastic disruptions from versions: I think is time to learn something from the past. Why 2.4 or 3.0 are a fault versions? Good coding (may be a little cryptic) with new programming paradigms but nobody's use it because the lack of contributions (well, frankl uses it, I know :laugh:). I think that 'sometimes' the official osCom development is good for learn PHP but core-developpers don't care if people will use the new or not. You can develop/code as you can/want but is good to see that the others are doing to try to keep customers/coders close. For example the 'new' feature for updating core versions (2.4) must be implemented in 2.3.

    ... and another NON related comments:

    - When 2.34 edge will be into the official download page? To much good work hidden in oscure forums links supplied for users... The 99% of people don't use this web as us (searching in every corner for news) but they need a easy way to be informed.

    - When a (decent) wiki where developers can read how to code, which functions classes exist (to avoid reinvent the reel) ,how name functions, conventions about dir  namming, class naming, etc. etc.?

    - When a (decent) language area where people can contribute to update/edit/download languages apart the english?

    - When a decent app's area where you can check if a app/contribution is good for you, the osC verssion that can support, the rating by ussers, link for forum, link for bug / suggestions? Why I CAN'T search for UPS or API or CSS?!?!? (please!!!!! decrease the minimun search characters for make the search in the app area)

  9. May be a seller wants something like that:




    even a 'simplified' version of:




    No more numbers, % or know if bootstrap has 12 or 14 colums. I think.


    I think that prestashop does somethink like that (a 'live editor'  for the front page).


    A 'live previev' (in products_info or even index - including columns) will be 'the paradise' of all (including coders) :thumbsup:

  10. 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





  11. @@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:



  12. umh!



    Acording a navbar submenu for categories :


    What about try to use a 'bootstrap' solution?


    First, a clever solution (not tested):




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










    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?

  13. 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.





    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.



  14. 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);




    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.




  15. 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.



  16. 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




    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.



  17. 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




    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'.