Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

I hv not looked at the internals of BS since 2014...

So to check it out I have just merged the latest and greatest...frozen and this admin...

https://github.com/clustersolutions/osCommerce-234-bootstrap/tree/osc2nuke

The installer ran, but I got these errors, they are stored in the DB configurations table? I am running PHP 7.2.5...

5b5d4b629c84d_ScreenShot2018-07-28at9_57_45PM.thumb.png.b7fbe8a22ddeb71814107282e574630b.png

Link to comment
Share on other sites

  • Replies 99
  • Created
  • Last Reply

Good catch, changed it back to BOOTSTRAP_CONTENT (it is unused at the moment).

I haven't make any changes in the .sql.
This error should go away assoon you visit:
https://yourdomain.com/admin/modules_admin_content.php

 

  $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ADMIN_CONTENT_INSTALLED' limit 1");
  if (tep_db_num_rows($check_query) < 1) {
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Installed Modules', 'MODULE_ADMIN_CONTENT_INSTALLED', '', 'This is automatically updated. No need to edit.', '6', '0', now())");
    define('MODULE_ADMIN_CONTENT_INSTALLED', '');
  }

Same for modules_admin.php?set=XXXXX

Link to comment
Share on other sites

Trying footer scripts in admin dashboard modules:

    $oscTemplate->addBlock($_js . PHP_EOL, 'footer_scripts');

Calling footer scripts in admin template_bottom.php:

<?php echo $oscTemplate->getBlocks('footer_scripts'); ?>

Working perfectly!

Link to comment
Share on other sites

1 minute ago, clustersolutions said:

The only thing is I am indifferent with $oscTemplate...I don't know if I am ready to put effort into it except for whatever's avail. Don't ask me why, it's just a gut thing for now...

 

$oscTemplate is only spitting out arrays of content.

I think it is the most simple approach.

Link to comment
Share on other sites

i wonder if this is something worth trying:
https://azouaoui-med.github.io/pro-sidebar-template/bootstrap4/
Now as we can use :

$oscTemplate->buildBlocks();
$oscTemplate->addBlock($block, $group);
$oscTemplate->hasBlocks($group);
$oscTemplate->getBlocks($group);

And even for "right boxes" there is some room.
In (almost) each admin file this could be replaced:
 

	if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
		echo '<div class="col-md-4" >' . "\n";

		$box = new box;
		echo $box->infoBox($heading, $contents);

		echo '</div>' . "\n";
	}

A little imagination for it required..........

Let's take the TOOLS from the columnLeft.
It could directly link to a $oscTemplate->getContent('tools');  content module.
Then in the "right" 
Show the links to all kind of tools.
As these are more "view" parts of the admin and not have any configuration options.

Link to comment
Share on other sites

I think I would keep uncoupling html and php in my mind, but if it is easy peasy I would say go for it.

Remember, V3 ended with the attempt to uncouple html and php, and 2.4 I think had an attempt to do that also. You don't want to continue diving into the deep end. You know you can borrow from existing framework's MVC?

Oh, for now, again...you probably have a full plate.

Link to comment
Share on other sites

The oscTemplate is already MV
The C(ontroller) is missing couse of the lack of decent classes.
And yes could use routes.


Still, using the oscTemplate like we use it now.
Comes closest to an MVC.
Backporting to an MVC with only MV is much more easier.

Link to comment
Share on other sites

@wHiTeHaT

It's a nice touch BS4 in the admin, but I think having fly-out menus (on hover) is significantly better and required...

Link to comment
Share on other sites

Just now, dr_lucas said:

It's a nice touch BS4 in the admin, but I think having fly-out menus (on hover) is significantly better and required...

It is not only BS4.

The same system that is used in your front-end for boxes can be used in the admin.
So if you choose to fly-out.........................
https://apps.oscommerce.com/

Link to comment
Share on other sites

Naah, not a contribution, I truly believe it must be added to the core by now. :smile:

See: http://demo.prestashop.com/en/?view=back 

Link to comment
Share on other sites

I must admin (as this repository is still under devellpment)
the oscTemplate *boxes calls are not yet done.

The whole menu on the left (columnLeft) is only 1 call to Tree up the whole menu.
 

Link to comment
Share on other sites

On 29/07/2018 at 7:24 AM, wHiTeHaT said:

Now that i active work on the admin, i see it have A LOT OF POTENTIAL.

I can guarantee you that any store owner that receives more than a few orders a day has had to modify their admin.

Modularity, classes, hooks etc are the way to go for admin.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

57 minutes ago, frankl said:

I can guarantee you that any store owner that receives more than a few orders a day has had to modify their admin.

 

"als de ene koe schijt, schijt de andere ook"

Link to comment
Share on other sites

8 hours ago, wHiTeHaT said:

https://github.com/osc2nuke/oscommerce-2.3.4.1-CE

Here you can show how it must be done.

Thanks. I am pretty sure you are a much better programmer than I am. :smile:

Link to comment
Share on other sites

Didn't write the addons, just copied and pasted other people work. :tongue:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...