Jump to content

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

Your Add-On Needs A New Hook In Cs-Cart. Post It Here. Rate Topic   * * * * * 1 votes

 
  • sioulisn
  • Junior Member
  • Members
  • Join Date: 06-Apr 09
  • 109 posts

Posted 15 November 2021 - 05:29 PM #181

Can you send us the YouTube channel name that we can see the screencasts?

 

Posted 16 November 2021 - 08:18 AM #182

Hello,

 

I need a hook 

 

fn_set_hook('check_master_products_add_to_cart_post', $cart, $product, $product_id, &$result);

 

We have to add the conditions like Vendor Debt Payout.

function fn_master_products_check_add_to_cart_post($cart, $product, $product_id, &$result)
{
    if (!$result
        || (Registry::get('addons.vendor_debt_payout.status') === 'A'
        && !empty($product_id)
        && (int) $product_id === fn_vendor_debt_payout_get_payout_product())
    ){
        return;
    }
    
    $product_company_id = db_get_field('SELECT company_id FROM ?:products WHERE product_id = ?i', $product_id);
    $result = !empty($product_company_id);
}


 
  • maimai
  • Advanced Member
  • Members
  • Join Date: 07-Aug 21
  • 53 posts

Posted 23 January 2022 - 05:52 AM #183

Hello all,

 

I have made some change on this hook to workaround my needs. what you have provided is, like this;

 

    fn_set_hook('get_banners', $params, $condition, $sorting, $limit, $lang_code, $fields);
 

cs-cart standard is always include the $join field on hooks on products, categories, companies, pages and more. the $join field is not included on banners addon's get_banners hook. so please make it like this;

 

    fn_set_hook('get_banners', $params, $join, $fields, $condition, $sorting, $limit, $lang_code);
 
I just changed the code lines and moved the $join field before the hook to set to get achieve my needs. it would be better for cs-cart to change it, so addon developers will not waste their time in future to check it.
 
Thanks!


 
  • ken
  • Member
  • Trial users
  • Join Date: 20-Aug 20
  • 17 posts

Posted 24 June 2022 - 09:33 AM #184

Add functionality to an existing addon.
Hi, can you show me how to add a function for a specific addon so that if there is an update to that addon I don't have to manually add and edit the code in the addon's func.php file? If possible, I would like some detailed instructions and specific examples, thanks for reading.


 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3943 posts

Posted 27 June 2022 - 01:48 PM #185

Hello!

 

 

Add functionality to an existing addon.
Hi, can you show me how to add a function for a specific addon so that if there is an update to that addon I don't have to manually add and edit the code in the addon's func.php file? If possible, I would like some detailed instructions and specific examples, thanks for reading.

 

Please, check the following articles for the details:

 

https://docs.cs-cart.../php_hooks.html

https://docs.cs-cart...s/advanced.html

 

Hope it helps.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • thecigarhut
  • Advanced Member
  • Members
  • Join Date: 07-Dec 21
  • 98 posts

Posted 28 June 2022 - 05:38 PM #186

Hello!

 

Please, check the following articles for the details:

 

https://docs.cs-cart.../php_hooks.html

https://docs.cs-cart...s/advanced.html

 

Hope it helps.

 

 

It would be really helpful if the hook database was updated as it has not been revised since v4.9.3

 

Hooks base (cs-cart.com)


osCommerce user since 2005 now upgrading to CS-Cart Ultimate.


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

Posted 29 June 2022 - 07:36 AM #187

*
POPULAR

The version selector just has incorrect sorting. Later versions exist there

 

https://prnt.sc/yu4IItHBmcsk


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 1210     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 4025     CS-Cart + YOUPI      USD 1459      Multi-Vendor Ultimate       USD 7500 (6000)