Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Has This Changed For Anyone Else? Rate Topic   - - - - -

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11759 posts

Posted 20 July 2020 - 07:12 PM #1

Using a addon.xml section of:

<functions>
  <item for="install">
    my_install_function
  </item>
</functions>

No longer seems to work on a new install when my_install_function() is in func.php.  It used to work.

 

So how does one now call a private installation function when the addon is first installed?

 

And of course, there is no error indication at all.

 

Thoughts?


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20929 posts

Posted 21 July 2020 - 05:46 AM #2

We use functions for integration of new payment methods. And it works for us on 4.11.x


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11759 posts

Posted 21 July 2020 - 05:53 PM #3

I have in the past as well and it no longer seems to work on a client site (4.11.3).  I've added a mode for 'check_install' that will call it after the install, but seems like it should load func.php after the settings are created and that 'my_install_function' would be called....  Wish there were some kind of logging of installation issues other than what's reported as errors via notifications.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 22 July 2020 - 01:23 PM #4

Using a addon.xml section of:

<functions>
  <item for="install">
    my_install_function
  </item>
</functions>

No longer seems to work on a new install when my_install_function() is in func.php.  It used to work.

 

So how does one now call a private installation function when the addon is first installed?

 

And of course, there is no error indication at all.

 

Thoughts?

Using the new object oriented addon style, haven't really found an issue with the install functions.

 

Are you sure you don't have a duplicate function declaration or if you maybe have a typo?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11759 posts

Posted 22 July 2020 - 05:54 PM #5

If there was a duplicate function name, I'd get a php error at runtime.
Here is the exact copy/paste from addon.xml.
 
<functions>
  <item for="install">
    ez_euro_texts_install
  </item>
</functions>

Using the new object oriented addon style

What do yo mean by the above? Documentation link?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20929 posts

Posted 23 July 2020 - 05:24 AM #6

I have in the past as well and it no longer seems to work on a client site (4.11.3).  I've added a mode for 'check_install' that will call it after the install, but seems like it should load func.php after the settings are created and that 'my_install_function' would be called....  Wish there were some kind of logging of installation issues other than what's reported as errors via notifications.

 

Do you want to call function before addon installation?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11759 posts

Posted 23 July 2020 - 05:55 PM #7

No, before it completes.  I.e. for="install".  Didn't know there was a for="preinstall".


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.