Latest News: (loading..)
Harald Ponce de Leon

2.4 Series

140 posts in this topic

Hey Guys..

 

No download release yet, but...

 

as has been noticed, the v2.4.0 Administration Dashboard is being worked on to also bring it up to the same level of awesomeness you have all worked hard on for the shop frontend. Although we're working hard on this, it will take a little bit of time to get all of the administration pages updated.

 

To help test and bug fix the shop frontend and administration dashboard further, v2.4.0 will start as a beta release series for testing and development purposes only. The first set of releases will focus on new installations first and an upgrade procedure for existing v2.2/v2.3 installations will be provided in later releases.

 

The first v2.4.0 beta release includes a core online update feature to 1-click apply update packages. v2.4.1 will be waiting for you as soon as v2.4.0 is pushed out to help test the online update feature. There are still a lot of changes pending so the following rules will apply for the online update feature:

 

During the beta release phase: any file in the catalog and admin directories are applicable to be updated and will overwrite any local changes made. (Eventually all files will be updated once we move from the GPL license to the BSD license)

After the beta release phase: any file apart from the catalog root files and shop template files will be applicable to be updated and will overwrite local changes made in other files (eg, in functions, classes, modules, and admin root files).

If a manual update to a root catalog file or catalog template file is required, this will be described in the release announcement.
As soon as we're ready to leave the beta phase and push out a production ready release, the version number may end up being v2.4.32 and will be marketed as "v2.4".

 

To reach that goal as fast as possible, we will only be requesting feedback on testing and bugs until the first production ready release is made. Feedback for improvements and new features will be welcome after this to include either in the next v2.4.x releases or in v2.5. We have already accumulated a lot of feedback and ideas so we're now focusing on testing and bug fixes.

 

The online update feature is just about ready. As soon as this is pushed out to github, all the development branches will be merged together and v2.4.0beta will be pushed out with a new announcement in the forum (with information about the App framework).

 

Here's a screenshot of the administration dashboard online update page to tease and wet your appetite:

 

post-2-0-85342800-1471477183_thumb.png

kymation, burt, azpro and 10 others like this

Share this post


Link to post
Share on other sites

In addition, we'll have a compatibility module available for those upgrading that will wrap removed functions (eg database) and constants (eg filenames, database names) to the new framework changes. This should allow v2.3 modules to continue to work with v2.4.

azpro, kymation, bruyndoncx and 1 other like this

Share this post


Link to post
Share on other sites

Thank you thank you thank you. I've created a folder on my test server for 2.4, and I'll start testing as soon as I can get a copy. This is indeed going to be awesome.

 

Regards

Jim

Share this post


Link to post
Share on other sites
How about that new code? Anyone been following HPDL's Git? IMO it's a little much, I would scale back some of the changes and rethink it a bit, However - its freaking good stuff going on.

 

The online update feature is just about ready. As soon as this is pushed out to github, all the development branches will be merged together and v2.4.0beta will be pushed out with a new announcement in the forum (with information about the App framework).

 

 

I'm going to eat some crow here with my previous words about the new code being a bit much. That statement HPDL made about information on the App framework - it makes a big difference.

 

Now that ive looked further in App area of the code, I see it's really right on course and has been well thought out. It looks like you can easily hook into any page, by writing a class file that goes into a directory specific to either the Shop or Admin, then call the class in with a hook. Also seems to have the ability to override depending which directory you place your code in? Custom dir?

 

How about that new application top? Sweet. This is almost a completely new beast, yet familiar enough in structure at the same time.

 

@@Harald Ponce de Leon You should just version it at V4 after it reaches its certain milestone. The codes mature enough and it did borrow from V3, therefore that places it ahead of V3, no? Whats left in 3 that the Git Branch doesn't have? A customer object - Looks great!  :thumbsup:

Edited by GLWalker

Share this post


Link to post
Share on other sites

@@Harald Ponce de Leon

 

Is it possible we can get an example page using the hooks/apps? Preferably something like the contact_us. I would like to see how the actions would be constructed in this method.

 

I see code for an execute action but can quite figure out how to trigger it.

Share this post


Link to post
Share on other sites

So, how compatible is this new 2.4 with 2.3.4BS? It would be a shame to toss out all the work put in to the community supported version by Gary, et al., in both the core and the add-on library. If it's not all that compatible, there is the real danger that 2.4 will be ignored, as 2.3.4BS has such a head-start on it and already has a critical mass of users and developers. On the other hand, if 2.4 is compatible enough with 2.3.4BS that migration will be fairly painless, it could be a real winner.

 

Sony's Betamax was superior to VHS, yet Sony lost the war due to expensive and restrictive licensing. IBM's MicroChannel architecture was arguably better than ISA, but IBM lost the war because they insisted on expensive and restrictive licensing. There's no licensing involved here, but a technologically superior solution isn't necessarily going to win the hearts and minds of the community, especially if a "good enough" solution is already widespread. Just sayin'...

Share this post


Link to post
Share on other sites

toss out all the work put in to the community supported version by Gary, et al.

99% of what we (this awesome community) have done over the past 2.5 years is IN !

We should all be very proud of this.

Share this post


Link to post
Share on other sites

@@MrPhil @@GLWalker as Phil is saying

gradual transition is essential

 

from what i gather the 2.4 (or whatever number will be used) 2.3.4 computability will cease? although we all agree OSC needs bringing upto date such a cold sharp shock to existing users will undoubtedly destroy future confidence (keep in mind these are businesses on low budgets that's why they install and learn OSC) and to suddenly leave them in the cold with a non responsive cart (bad) or force them to loose their website they have built and customised with the features they needed to function is also bad especially if this will involve relearning everything from the start as the changes are so big.

I would slow down on major overhaul and introduce a number of gradual changes that head towards the end goal so as users can upgrade and adapt to the changes.

 

Like changing the filenames.php simple change that could have been a sub version and users could then make the changes fairly quickly without breaking their sites, then release the next step (whatever it may be) that they can then incorporate (like we are doing via the git releases).

if you suddenly jump to a completely new and incompatible version in the next public release what are your existing user base supposed to do?

Share this post


Link to post
Share on other sites

@@ShaGGy

 

 

I would slow down on major overhaul and introduce a number of gradual changes that head towards the end goal so as users can upgrade and adapt to the changes.

 

This is precisely what many (if not most) of the complaining has been in the recent years... "slowing down". It sounds to me like OsC is taking a well needed HUGE step forward - the step forward that has been missing for many years.

 

It also sounds like there will be (some) compatibility and we (as the forum) will certainly find ways to use many of the currently available addons... I'm sure of this. Just as we do now with the vast majority of 2.2 addons we (as the forum) currently update, tweek and order just rewrite to work with 2.3.x and the community BS version.

Share this post


Link to post
Share on other sites

What do you mean by "the responsive version"? Are you referring to 2.3.4BS? If so, when 2.4 officially comes out, there should be some sort of EOL for 2.3.4BS, to encourage everyone to move up to 2.4. osC 2.4 will be responsive, too, with some sort of upgrade path expected from 2.3.4BS.

 

yes 2.3.4 BS

 

Should be? why?

 

anyways i regards this as rumors until Gary says otherwise

Share this post


Link to post
Share on other sites

Should be? why?

I assume this refers to the EOL on 2.3.4BS. Harald (or someone in position to say, I'd have to go back and look) said that. We do need to converge osC development so the effort speaks with one voice. It's not good to have competing versions of the product.

 

anyways i regards this as rumors until Gary says otherwise

A prudent course of action. Until 2.4 actually appears, live and in the flesh, you should continue with 2.3.4BS. From what both Harald and Gary said, 2.4 should be basically a superset of 2.3.4BS, so there is no reason for Gary to continue on with his (albeit much appreciated) separate version.

 

Beyond repeating what they've said in this thread, I can't speak for anyone involved. You should read their posts yourself. Of course, plans have a way of evaporating into thin air. Remember when 3.0 was just around the corner?

Share this post


Link to post
Share on other sites

yep... that corner is still there... only problem we dont know how far away it is :-D

 

also find it strange to annouce a 2.4 when they have 3.0 still on their site...

 

and looking at github and latest updates etc it makes far less sence

 

so yes... 2.3.4BS is the latest if you ask me... 2.4 does not exist and so far it has only been rumors 

Share this post


Link to post
Share on other sites

Well it says nothing on what happens to BS

 

Why keep it so much a secret?... 2.4 is on github and so it 2.3... but the last updated times does not make much sense

 

3.0 has been annouced for ages... its not logic to keep that and stick something in between

Share this post


Link to post
Share on other sites

Well it says nothing on what happens to BS

 

Why keep it so much a secret?... 2.4 is on github and so it 2.3... but the last updated times does not make much sense

The v2.4.0 series is built from 2.3.4BS EDGE. It is taking the work you have all done and making it an official release. The major difference is the addition of the framework and App implementations, and an updated Administration Dashboard interface (also based on Bootstrap).

 

If you are running on 2.3.4 BS then you are expected to upgrade to v2.4.0 once it is production ready. A compatibility module will exist to help with the upgrade.

 

If you are on v2.3.4 (official release) then you have the option of staying on that version until the to-be-announced end-of-life date is met, before upgrading to a newer v2.x or v3.x release.

 

Don't panic.

Tsimi, GLWalker, raiwa and 5 others like this

Share this post


Link to post
Share on other sites

Awesome!!! Revisiting this forum after being away for a while it's like Xmas in August...it's about time. Thank you!

Share this post


Link to post
Share on other sites

Ok - I know I'm a little premature... but I "had to" see how the new bootstrapped backend of 2.4 is looking so I downloaded from github....@@Harald Ponce de Leon you've out done yourself.

 

I certainly could speak to the coding... and I realize it is not production ready... but I'm already starting to lick my lips.

 

With @@burt already starting to update many of his addons to work with 2.4 ... It won't be long before I start my next upgrade (we will see how hard it will be to maintain the ethos of no core changes).

Share this post


Link to post
Share on other sites

Hello,

 

Playing with 2.4.1 and trying to update an add-on for that vesion I have the following question:

How to adapt the following database query to he new  coding:

      tep_db_query( "create table if not exists `products_related_products` (`pop_id` int(11) not null auto_increment, `pop_products_id_master` int(11) not null default '0', `pop_products_id_slave` int(11) not null default '0', `pop_order_id` smallint(6) not null default '0', primary key  (`pop_id`))");

My simplified intents produce blank page:

      return Registry::get('Db')->exec('create :new_products_related_products');
      return Registry::get('Db')->exec(':new_products_related_products');

would the condition be correct:

"cond:if not exists"

 

and how to add the settings:

"(`pop_id` int(11) not null auto_increment, `pop_products_id_master` int(11) not null default '0', `pop_products_id_slave` int(11) not null default '0', `pop_order_id` smallint(6) not null default '0', primary key (`pop_id`)"

 

Any resouces available with examples for the new coding apart of the axamples in the core files??

 

I couldn't find any example in core files for new table creation or delete table.

 

Would the following be correct to delete the table:

      	return Registry::get('Db')->exec('drop :table_products_related_products cond:if exists');

thanks a lot

Rainer

Share this post


Link to post
Share on other sites

Some Element can help you to update the modules: There are not all but it can help you to convert 2.3.x in 2.4

osc_output_string_protected ==> HTML::outputProtected()
osc_db_prepare_input ==> HTML::sanitize()
osc_draw_input_field() ===> HTML::inputField()
osc_href_link ===> OSCOM::link()
osc_redirect ====> OSCOM::redirect 
!osc_db_num_rows($product_info_query) ============> $Qcheck->fetch() === false
osc_db_num_rows($product_info_query) ============> $Qcheck->fetch() !== false

read db

        $Qcheck = $OSCOM_PDO->prepare('select id
                                       from table_administrators
                                       limit 1
                                      ');
        $Qcheck->execute();

        $Qcheck = $OSCOM_PDO->get('administrators', 'id', null, null, 1);

by

       $Qcheck = $OSCOM_Db->get('administrators', 'id', null, null, 1);
or 

    $Qzone = $OSCOM_PDO->prepare('select zone_code
                                 from :table_zones
                                 where zone_country_id = :zone_country_id
                                 and zone_id = :zone_id
                               ');
    $Qzone->bindInt(':zone_country_id', (int)$country_id);
    $Qzone->bindInt(':zone_id', (int)$zone_id );

Save in db

$OSCOM_Db->perform('customers', $sql_data_array, array('customers_id' => $OSCOM_Customer->getID()));

$OSCOM_Db->perform('customers_info', array('customers_info_date_account_last_modified' => 'now()'),
                                      array('customers_info_id' => $OSCOM_Customer->getID())
                           );
$OSCOM_Db->perform('customers', $sql_data_array, array('customers_id' => $OSCOM_Customer->getID()) );

=====>
$OSCOM_Db->save('customers', $sql_data_array, ['customers_id' => (int)$customer_id]);

$OSCOM_Db->save('customers_info', ['customers_info_date_account_last_modified' => 'now()'],
                                  ['customers_info_id' => (int)$customer_id]);


$OSCOM_Db->save('address_book', $sql_data_array, ['customers_id' => (int)$OSCOM_Customer->getID(),
                                                  'address_book_id' => (int)$customer_default_address_id]);

Update

 osc_db_query('update configuration
                set configuration_value = "' . trim($_POST['CFG_STORE_NAME']) . '"
                where configuration_key = "STORE_NAME"
               ');

 $OSCOM_Db->save('configuration', ['configuration_value' => $_POST['CFG_STORE_NAME']],
                                  ['configuration_key' => 'STORE_NAME']);

configuration module

osc_db_query("insert into configuration (
configuration_title, 
configuration_key, configuration_
value, configuration_description, 
configuration_group_id, 
sort_order, 
set_function, date_added) 
values (
'Display order ?', 
'MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 
'True',
 'Last order', 
'6',
 '1',
 ' ',
 now())");

by 

$OSCOM_Db->save('configuration', [
'configuration_title' => 'Display order ?',
'configuration_key' => 'ORDERS',
'configuration_value' => '',
'configuration_description' => 'Last order',
'configuration_group_id' => '6',
'sort_order' => '1',
'set_function' => '',
'date_added' => 'now()'
]);
Edited by Gyakutsuki

Share this post


Link to post
Share on other sites

Hello Loic @@Gyakutsuki,

 

Thank you, nice resume. I could figure this out already by the core file examples.

 

The question was how to create a new table and how to delete a table.

I found now the option how to just execute a standard query using:

return Registry::get('Db')->query("...........

instead of the old:

tep_db_query( ".............

So my complete example is:

			return Registry::get('Db')->query( "create table if not exists `products_related_products` (`pop_id` int(11) not null auto_increment, `pop_products_id_master` int(11) not null default '0', `pop_products_id_slave` int(11) not null default '0', `pop_order_id` smallint(6) not null default '0', primary key  (`pop_id`))");

and

      	return Registry::get('Db')->query( "drop table if exists `products_related_products`");

Kind regards

Rainer

frankl likes this

Share this post


Link to post
Share on other sites

I haven't to manage that just you can look this hook, it can help you.

Also there is function to delete a base but you can use for exemple this

          $Qdelete = $OSCOM_PDO->prepare('delete
                                          from :table_products_notifications
                                          where customers_id = :customers_id
                                          and products_id not in (:products_id)');
          $Qdelete->bindInt(':customers_id', $OSCOM_Customer->getID());
          $Qdelete->bindValue(':products_id', implode(', ', $products_parsed));
          $Qdelete->execute();

example : Hooks to open and close the shop

 namespace OSC\OM\Module\Hooks\Shop\AllShop;

  use OSC\OM\OSCOM;
  use OSC\OM\Registry;

  class StoreOffLine {

    private function install() {
      $OSCOM_Db = Registry::get('Db');

        $OSCOM_Db->save('configuration', [
            'configuration_title' => 'Do want to put the shop in maintenance ?',
            'configuration_key' => 'STORE_OFFLINE',
            'configuration_value' => 'false',
            'configuration_description' => 'Si true, your site will be in off line and the customer could not take an</i>',
            'configuration_group_id' => '1',
            'sort_order' => '23',
            'set_function' => 'osc_cfg_set_boolean_value(array(\'True\', \'False\'))',
            'date_added' => 'now()'
          ]
        );


        $OSCOM_Db->save('configuration', [
            'configuration_title' => 'Who is authorized to connect to the site when the shop is under maintenance',
            'configuration_key' => 'STORE_OFFLINE_ALLOW',
            'configuration_value' => '',
            'configuration_description' => '<br>Please specify your IP address or yours IP addresses. If you have multiple IP addresses, please follow the instructions in parentheses (Each IP must be separated by commas <br />ex: 127.0.0.1,222.0.0.5',
            'configuration_group_id' => '1',
            'sort_order' => '24',
            'set_function' => '',
            'date_added' => 'now()'
          ]
        );
      }
    }



    public function execute() {

/*
* install db
*/
      if (!defined(STORE_OFFLINE) == true || STORE_OFFLINE == null || empty(STORE_OFFLINE)) {
        $this->install();
      }

      if(STORE_OFFLINE == 'True') {

        $allowed_ip = false;
        $ips = explode(',', STORE_OFFLINE_ALLOW);

        foreach($ips as $ip) {
          if(trim($ip) == $_SERVER['REMOTE_ADDR']) {
            $allowed_ip = true;
            break;
          }
        }

        if($allowed_ip == false) {
          OSCOM::redirect('offline.html');
        }
      }
    }
  }
frankl likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now