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

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,137 posts

Posted 17 September 2015 - 07:21 PM #41

Without going through each, I would guess that the {caputre name="price"} area would use the underlying {$product_data.price} which has the hooks I mentioned.  So it might be that you can hit all of these by doing what you need to do with the product_data hook(s).


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.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,137 posts

Posted 24 September 2015 - 08:27 PM #42

Need a 'get_product_prices_post' hook at the end of fn_get_product_prices() in fn.catalog.php. 

fn_set_hook('get_product_prices_post', $product_data, $auth, $company_id);

 

Seems like this function is starting to be used (but not used by fn_get_product_data() itself) for retrieving product pricing.

Right now there are several actions for retrieving the product price(s).  This should really be consolidated into one interface so that price adjustment addons can be developed without having to duplicate code for 5 different hooks where pricing is retrieved from the DB.  Suggest that ALL product pricing be done via this function to eliminate ambiguity.  Would allow for one hook to be used.


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.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3,446 posts

Posted 24 September 2015 - 09:48 PM #43

Damn Tony.  I didn't mean to open a can of worms for you. :P



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,137 posts

Posted 25 September 2015 - 05:13 AM #44

It's all good.

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.


 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 12 October 2015 - 02:15 PM #45

Not a new hook, just an extra parameter added to an existing one.

 

save_cart should also include the $user_type variable.

 

So 

fn_set_hook('save_cart', $cart, $user_id, $type);

would become

fn_set_hook('save_cart', $cart, $user_id, $type, $user_type);

in app/functions/fn.cart.php:1472

 

Thanks!

Will be done in 4.3.5

There will be too hooks:

fn_set_hook('save_cart_pre', $cart, $user_id, $type, $user_type); - in the begining of the function

fn_set_hook('save_cart_post', $cart, $user_id, $type, $user_type, $_cart_prods); - just before the line "return true";

'save_cart' hook will be depricated, but will still be available until 5.x.x


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 12 October 2015 - 02:24 PM #46

 

 

Another hook suggestion for fn_create_order_details:

 

v4.3.1 app/functions/fn.cart.php:1093

fn_set_hook('create_order_details', $order_id, $cart, $order_details);

Thanks

Planned for 4.3.5

There will be ability to change popularity and order_details arrays before the Insert query.


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 

Posted 14 October 2015 - 07:49 AM #47

Will be done in 4.3.5

There will be too hooks:

fn_set_hook('save_cart_pre', $cart, $user_id, $type, $user_type); - in the begining of the function

fn_set_hook('save_cart_post', $cart, $user_id, $type, $user_type, $_cart_prods); - just before the line "return true";

'save_cart' hook will be depricated, but will still be available until 5.x.x

 

 

Planned for 4.3.5

There will be ability to change popularity and order_details arrays before the Insert query.

 

That's great. Thanks!



 
  • Pervolo
  • Advanced Member
  • Trial users
  • Join Date: 07-Oct 15
  • 56 posts

Posted 22 October 2015 - 01:39 PM #48

need a "discussion_posts_pre", "discussion_posts_post", "discussion_delete_post_post" hooks in app/addons/discussion/func.php



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,137 posts

Posted 08 November 2015 - 07:36 AM #49

Please add a hook a the bottom of backend/views/companies/components/logos_list.tpl (outside the foreach loop) of:

{hook name="companies:logos_post"}{/hook}

So that other imagery can be added to a company such as examples of work, profile pictures, etc.  Goal is to have all imagery on one page.


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.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,137 posts

Posted 09 November 2015 - 07:18 PM #50

Please add a hook

fn_set_hook('companies_change_status_post', $company_id, $status_to, $reason, $status_from, $notify, $user_data);
in fn.companies.php within function fn_companies_change_status().

 

Just ahead of the notification/mailing functions.  Goal is to be able to auto-add a usergroup to a vendor's user_data before the email is sent so that the usergroup will be included in the notification.

 

You could add a '_pre" hook too to keep things consistent.


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.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,137 posts

Posted 19 November 2015 - 08:40 PM #51

Please add a hook in backend/views/companies/update.tpl such as:

        {capture name="tools_list"}
            <li>{btn type="list" text=__("delete") class="cm-confirm cm-post" href="companies.delete?company_id=`$id`"}</li>
            {**EZms added hook **}
            {hook name="companies:tools_list"}{/hook}
        {/capture}

So we can add dropdown menu items to vendor (company) pages.


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.


 
  • cs-mods
  • Newbie
  • Trial users
  • Join Date: 01-Dec 15
  • 1 posts

Posted 01 December 2015 - 09:48 PM #52

Hi,

 

Please add template hooks for adding additional fields/table columns in:

design/backend/templates/addons/banners/views/banners/manage.tpl

and

design/backend/templates/addons/banners/views/banners/update.tpl

 

e.g.

{hook name="banners:general_content"}

{hook name="banners:manage_header"}{/hook}

{hook name="banners:manage_data"}{/hook}

 

Thanks!



 
  • Pervolo
  • Advanced Member
  • Trial users
  • Join Date: 07-Oct 15
  • 56 posts

Posted 02 December 2015 - 08:15 AM #53

Please add hook in /app/addons/seo/func.php

fn_set_hook('seo_url_before_pager', $seo_settings, $url, $parsed_url, $link_parts, $parsed_query, $company_id_in_url, $lang_code);

between

                    if (fn_check_seo_schema_option($seo_var, 'html_options', $seo_settings)) {
                        $link_parts['extension'] = SEO_FILENAME_EXTENSION;
                    } else {
                        $link_parts['name'] .= '/';
                    }

and

                    if (!empty($seo_var['pager'])) {

                        $page = isset($parsed_query['page']) ? intval($parsed_query['page']) : 0;

                        if (!empty($page) && $page != 1) {
                            if (fn_check_seo_schema_option($seo_var, 'html_options', $seo_settings)) {
                                $link_parts['name'] .= $d . 'page' . $d . $page;
                            } else {
                                $link_parts['name'] .= 'page' . $d . $page . '/';
                            }
                        }
                        unset($parsed_query['page']);
                    }

So we can add/remove uri pieces more easily



 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 03 December 2015 - 09:31 AM #54

need a "discussion_posts_pre", "discussion_posts_post", "discussion_delete_post_post" hooks in app/addons/discussion/func.php

Planned for 4.3.6


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 03 December 2015 - 09:36 AM #55

Please add a hook a the bottom of backend/views/companies/components/logos_list.tpl (outside the foreach loop) of:

{hook name="companies:logos_post"}{/hook}

So that other imagery can be added to a company such as examples of work, profile pictures, etc.  Goal is to have all imagery on one page.

 

Tony, we will do it a bit different, same ways as with categories in design/backend/templates/views/companies/update.tpl template

So this:

    <div id="content_logos" class="hidden">
        {include file="views/companies/components/logos_list.tpl" logos=$company_data.logos company_id=$id}
    </div>

will be replaced with :

    <div id="content_logos" class="hidden">
    {hook name="companies:logos"}
        {include file="views/companies/components/logos_list.tpl" logos=$company_data.logos company_id=$id}
    {/hook}
    </div>

Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 03 December 2015 - 09:47 AM #56

Please add a hook

fn_set_hook('companies_change_status_post', $company_id, $status_to, $reason, $status_from, $notify, $user_data);
in fn.companies.php within function fn_companies_change_status().

 

Just ahead of the notification/mailing functions.  Goal is to be able to auto-add a usergroup to a vendor's user_data before the email is sent so that the usergroup will be included in the notification.

 

You could add a '_pre" hook too to keep things consistent.

Function fn_companies_change_status will be renamed to fn_change_company_status. Functionn fn_companies_change_status will be depricated and call the new fn_change_company_status.

 

We will add 3 hooks to fn_change_company_status.

  • companyies_change_status_pre
  • companyies_change_status_before_mail
  • companyies_change_status_post

 

Also pre & post hooks will be added to fn_create_company_admin


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 03 December 2015 - 09:56 AM #57

Please add a hook in backend/views/companies/update.tpl such as:

        {capture name="tools_list"}
            <li>{btn type="list" text=__("delete") class="cm-confirm cm-post" href="companies.delete?company_id=`$id`"}</li>
            {**EZms added hook **}
            {hook name="companies:tools_list"}{/hook}
        {/capture}

So we can add dropdown menu items to vendor (company) pages.

Will be like this:

        {capture name="tools_list"}
            {hook name="companies:tools_list"}
            <li>{btn type="list" text=__("delete") class="cm-confirm cm-post" href="companies.delete?company_id=`$id`"}</li>
            {/hook}
        {/capture}

Planned for 4.3.6


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 03 December 2015 - 10:37 AM #58

Hi,

 

Please add template hooks for adding additional fields/table columns in:

design/backend/templates/addons/banners/views/banners/manage.tpl

and

design/backend/templates/addons/banners/views/banners/update.tpl

 

e.g.

{hook name="banners:general_content"}

{hook name="banners:manage_header"}{/hook}

{hook name="banners:manage_data"}{/hook}

 

Thanks!

We will consider this, will let you know the result within two weeks.


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 1,849 posts

Posted 03 December 2015 - 10:41 AM #59

Please add hook in /app/addons/seo/func.php

fn_set_hook('seo_url_before_pager', $seo_settings, $url, $parsed_url, $link_parts, $parsed_query, $company_id_in_url, $lang_code);

between

                    if (fn_check_seo_schema_option($seo_var, 'html_options', $seo_settings)) {
                        $link_parts['extension'] = SEO_FILENAME_EXTENSION;
                    } else {
                        $link_parts['name'] .= '/';
                    }

and

                    if (!empty($seo_var['pager'])) {

                        $page = isset($parsed_query['page']) ? intval($parsed_query['page']) : 0;

                        if (!empty($page) && $page != 1) {
                            if (fn_check_seo_schema_option($seo_var, 'html_options', $seo_settings)) {
                                $link_parts['name'] .= $d . 'page' . $d . $page;
                            } else {
                                $link_parts['name'] .= 'page' . $d . $page . '/';
                            }
                        }
                        unset($parsed_query['page']);
                    }

So we can add/remove uri pieces more easily

There will be a number if significant changes in 4.3.5 or 4.3.6 SEO func.php file due to this bug fix: http://forum.cs-cart...ing-unique-urls

So we can not add hooks yet, until we make sure that everything is working correctly. 


Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 16,113 posts

Posted 17 December 2015 - 07:32 AM #60

app/functions/fn.common.php

 

Please add post hook to the fn_get_simple_statuses function


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия