Jump to content

Create custom link in primary sidebar


japes

Recommended Posts

Hello,

Trying to change the link in the clientarea's primary sidebar. Currently, the format is set up as "/index.cfm?cc=' . $cc . ' " where cc is a customer code that is loaded with the "GetClientsProducts" hook as follows:

    $command  = 'GetClientsProducts';
    $postData = array(
        'clientid' => $_SESSION['uid'],
        'pid'      => 6,
        'limitnum' => 1,
    );

    $merchant_membership = localAPI( $command, $postData );

    $merchant_digital_name = '';
    if ( 0 !== $merchant_membership['totalresults'] ) {

        foreach ( $$merchant_membership['products'] as $product ) {

            if ( ! isset( $product[0]['customfields'] ) || empty( $product[0]['customfields'] ) ) {
                continue;
            }

            foreach ( $product[0]['customfields'] as $customfield ) {

                if ( empty( $customfield ) ) {
                    continue;
                }

                foreach ( $customfield as $customfield_data ) {

                    if ( 'Digital Name' === $customfield_data['name'] ) {
                        $personal_digital_name = $customfield_data['value'];
                    }
                    if ( 'Customer Code' === $customfield_data['code'] ) {
                        $cc = $customfield_data['value'];
                    }
                }
            }
        }
    }

any pointers on how to make this work? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated