Jump to content
Latest News: (loading..)

Recommended Posts

Another thought about the hook calls:

an installation function in core to add the hook call by auto file edit in the add-on installation script.

variables to pass to the function:

- filename

- hook name

- reference core line where to insert the hook call ( above/below)

have a look into the script used in the points and rewards add-on: ht-points_rewards.php

It adds and removes the hook registry and calls for all hooks in several core pages.

Of course it would need to be improved.

Requirement: no core file changes or at least following strict edit rules (blank lines etc)

 

 

Share this post


Link to post
Share on other sites

Other suggestion for hooks:

auto include language file if exists in includes/classes/hooks.php:

      if ( file_exists($directory) ) {
        if ( $dir = @dir($directory) ) {
          if ( file_exists('includes/languages/' . $language . '/hooks/' . $this->_site . '/' . $group) ) {
            include('includes/languages/' . $language . '/hooks/' . $this->_site . '/' . $group);
          }

          while ( $file = $dir->read() ) {

 

Share this post


Link to post
Share on other sites
19 hours ago, raiwa said:

an installation function in core to add the hook call by auto file edit in the add-on installation script.

variables to pass to the function:

- filename

- hook name

- reference core line where to insert the hook call ( above/below)

have a look into the script used in the points and rewards add-on: ht-points_rewards.php

It adds and removes the hook registry and calls for all hooks in several core pages.

Of course it would need to be improved.

If I understand this correctly, it sounds like an awesome idea.  Could it be a stand alone module to inject hooks or module calls without actually editing the core files --- at least until the core files are fully modularized?

Dan

 

Share this post


Link to post
Share on other sites
20 minutes ago, Dan Cole said:

Could it be a stand alone module to inject hooks or module calls without actually editing the core files --- at least until the core files are fully modularized?

On second thought, I guess it is not much different then editing the files themselves but it does make you wondered if we need to add any predefined hooks at all or whether Gary @burt can simply cross this issue off his path to final list and move on.

Dan

Share this post


Link to post
Share on other sites

The original ethos behind the hook system is to stop addon makers from forcing users to;

Find Line X in xyz.php
Add in 50 lines of code

Save

Instead, the Hook file has the 50 lines of code in it. And then addon maker says;

Upload Hook
Find Line X in xyz.php
Add 1 line of code

Save

 

I have zero plan to change any aspect of the Hook system.
I have zero plan to add in pre-placed hooks.

Anything that adds more work, I have no interest in taking on.  If that work gets done by someone else, is 100% fully bug free and tested, and is done at a clean Github...meaning all I have to do is press a button, I'm all for it.  Put bluntly;  I aint doing anything else.

 

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

Anyone got comments on the index_products implementation?


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce here: https://github.com/gburton/osCommerce-234-bootstrap/archive/master.zip

 

For Github users: Bootstrap addons - one per branch - https://github.com/BrockleyJohn/Responsive-osCommerce/wiki/Overview-of-Branches

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
Posted (edited)
8 hours ago, burt said:

Upload Hook

Find Line X in xyz.php
Add 1 line of code

Right now it is "Add 2 lines of code": register hook and call hook.

With the following in application_top.php it would be 1 line:

$OSCOM_Hooks->register(strtok($PHP_SELF, '.'));

 

8 hours ago, burt said:

I have zero plan to change any aspect of the Hook system.

Why then should someone loose the time to create a pull request :sleep:

Edited by raiwa

Share this post


Link to post
Share on other sites

@burt you don't think it's confusing to have a module called cm_ip_category_description outputting a manufacturer description?


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce here: https://github.com/gburton/osCommerce-234-bootstrap/archive/master.zip

 

For Github users: Bootstrap addons - one per branch - https://github.com/BrockleyJohn/Responsive-osCommerce/wiki/Overview-of-Branches

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
1 hour ago, BrockleyJohn said:

Anyone got comments on the index_products implementation?

I have - doesn't work! PR in with fixes...


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce here: https://github.com/gburton/osCommerce-234-bootstrap/archive/master.zip

 

For Github users: Bootstrap addons - one per branch - https://github.com/BrockleyJohn/Responsive-osCommerce/wiki/Overview-of-Branches

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
2 hours ago, raiwa said:

Why then should someone loose the time to create a pull request :sleep:

And that, right there, is why it's taken over 4 years to get anywhere.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
2 hours ago, BrockleyJohn said:

@burt you don't think it's confusing to have a module called cm_ip_category_description outputting a manufacturer description?

Yep.

IIRC I renamed it prior to remembering that it is also used @ index-manufacturers :(

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
1 hour ago, BrockleyJohn said:

I have - doesn't work! PR in with fixes...

I'm currently reviewing the original one.  I have some fixes and things in place...


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)

I took as much unpaid leave as I could in March to try to get to Final prior to the end of March, thank you to those few guys who bought into the 28d Project which allowed that :thumbsup: 

Unfortunately I was unable to get to a Finalised release inside the March timeframe.  But it is close.

Product Class did not make it :(
Category Class did :)  
Lots of things updated and renamed.

I need to fix a few modules, then I will push what has been done to Master and will call it final.

After that, it's the end of the Community Version in terms of coding, as coders prefer to start their own splinter projects rather than help to get this version Final.  

 

Edited by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
7 minutes ago, burt said:

After that, it's the end of the Community Version in terms of coding, as coders prefer to start their own splinter projects rather than help to get this version Final.

What a pity. I can only see it causing confusion to shop owners with all the different versions and no official version to use that is any good.

Gary - Thanks for what you have done.


REMEMBER BACKUP, BACKUP AND BACKUP

 

Find information about the bootstrap community version here

 

Make it idiot proof and someone will make a better idiot.

Share this post


Link to post
Share on other sites
On 14/3/2018 at 3:36 PM, burt said:

5. getContent calls
DISCUSSION

  • Discussion needed

If the modular shopping cart is discarted and I suppose the modular checkout will be late or not planned to be included, the following calls should be considered:

  • shopping cart: between alternative checkout section and closing </form>
  • checkout shipping and payment above or below comments
  • checkout confirmation before confirm order button
  • product reviews and reviews write: at the bottom of main content
  • create account: before continue button (not sure if needed)

 

Share this post


Link to post
Share on other sites
Just now, raiwa said:
  • shopping cart: between alternative checkout section and closing </form>
  • checkout shipping and payment above or below comments
  • checkout confirmation before confirm order button
  • product reviews and reviews write: at the bottom of main content
  • create account: before continue button (not sure if needed)

What is the reasoning for these?


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

There are many addons out already which use content modules or could be changed to use content modules instead of hook or ht in these pages:

shopping cart: continue shopping, shipping estimator, recently viewed products, related products...

checkout payment: discount code, points and rewards, matc

checkout confirmation: matc

create account: recaptcha

contact us: (just remembered): recaptcha

...

I believe it wouldn't do any harm but help add-on coders and store owners

Share this post


Link to post
Share on other sites

I don't see much point in adding getContent calls unless the page is full modularised.  It might as well be up to the individual addon maker to provide an instruction and up to the individual shopowner to copy/paste a line of code.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
10 minutes ago, burt said:

I don't see much point in adding getContent calls unless the page is full modularised.

It is (was) done like this in product info since years

10 minutes ago, burt said:

 It might as well be up to the individual addon maker to provide an instruction and up to the individual shopowner to copy/paste a line of code.

It's just this: add one line to core file and install module versus install one module and not any file change

Full modular shopping cart exists since years, see also

https://forums.oscommerce.com/topic/412708-path-to-final/?do=findComment&comment=1767650

https://forums.oscommerce.com/topic/412708-path-to-final/?do=findComment&comment=1767662

Share this post


Link to post
Share on other sites
Just now, raiwa said:

It is (was) done like this in product info since years

Yep.  In the *hope* that some coders would help to create modules to replace the page.

Who ended up doing that?


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
1 minute ago, raiwa said:

Full modular shopping cart exists since years, see also

Did not like some of the implementation.  Recoded portions of it, just to be abused by PM and Email.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Just now, burt said:

Yep.  In the *hope* that some coders would help to create modules to replace the page.

Who ended up doing that?

I pushed a full modularized product info years ago, was rejected:

On 14/3/2018 at 5:28 PM, BrockleyJohn said:

I have a couple of clients live on variants of raiwa's modular product_info which you thought was too granular. Would you like that rolling up into something more suitable - or are you just thinking along the lines of an extra hook or two?

 

Share this post


Link to post
Share on other sites

Rejected due to abuse by PM and Email, after recoding it.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (edited)

The last 2 messages are inverted in order, I'm not a clairvoyant. Had the window with the message already open and saw your next message in another tab :rolleyes:

Meanwhile @Dan Cole and me are working on the Modular Checkout. Seems we are late, but who knows :smile:

Edited by raiwa

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

×