Questions In Developer's Corner

Hello,

actually i'm halfway done setting up cs-cart mve.
It works fine but i need some customisation where i get stuck on.

I bought my license from a reseller but he didn't provide support as i thought it would be.
Is it possible to get support here instead?


Would be great to hear from you guys!

Welcome to CS-Cart! If you need any customization service, please feel free to contact us here.

Is it possible to get support here instead?

Please ask your questions here. This is community forum and we will try to help you

Hello cscartrocks,

Sent you a message at your provided link - thank you!
Would be great to hear from you soon.

For all the dev's here.
I want an additional vendor-logo.

on logo_list.tpl i've found this. I thought i need to write my own plugin for this but after viewing this part of code i came up with the idea that i've only need to add a new type? Right?

{foreach from=$logo_types key="type" item="type_data"}

Would be great if anyone can push me into the right direction, i'm new to cs-cart but i've developed many plugins for Wordpress & WooCommerce.

Hello,
Feel free to contact us regarding any type of Cs-cart customizations.
We are here to help you. Please contact us on https://webkul.uvdesk.com/en/

I've added two more logo_types via AddOn, hooked into logo_types but it won't save the pictures & alt names
Pretty sure i missed something, looks like these two files didn't fire up correctly

{script src="js/tygh/fileuploader_scripts.js"}
{script src="js/tygh/node_cloning.js"}

on the two existing input fields it it shows up as followed

on my custom fields it shows up like this

any ideas??

I've added two more logo_types via AddOn, hooked into logo_types but it won't save the pictures & alt names
Pretty sure i missed something, looks like these two files didn't fire up correctly

{script src="js/tygh/fileuploader_scripts.js"}
{script src="js/tygh/node_cloning.js"}

on the two existing input fields it it shows up as followed

on my custom fields it shows up like this

any ideas??

Hello!

What did you add in logo_types hook?

Hello Oleg,

thanks for your answer!
I really appreciate your help!


my init.php

if ( !defined('AREA') ) { die('Access denied'); }

fn_register_hooks(‘logo_types’);

?>

my func.php

use Tygh\Settings;

if ( !defined(‘AREA’) ) { die(‘Access denied’); }

function fn_profile_picture_logo_types(&$types, &$for_company = false)
{

$profile_pic = Settings::instance()->getValue('add_profile_picture', 'profile_picture', $company_id);
$shop_banner = Settings::instance()->getValue('add_shop_header', 'profile_picture', $company_id);



    if($shop_banner === 'Y') {
    $types['banner'] = array(
        'for_layout' => true,
        'text' => 'text_vendor_shop_banner',
        'image' => 'banner.png',
    );
      } 

    if($profile_pic === 'Y') {
    $types['profile'] = array(
        'for_layout' => true,
        'text' => 'text_vendor_profile_picture',
        'image' => 'profile.png',
    );
      }

}

@oleg

the upload works, but only on new registered users.

I came up to this after looking into the database %prefix%_logos there was no entry for the uploaded images - but the images itself are uploaded correctly. Any ideas how to fix this?



@oleg

the upload works, but only on new registered users.

I came up to this after looking into the database %prefix%_logos there was no entry for the uploaded images - but the images itself are uploaded correctly. Any ideas how to fix this?



Please also check if your image exists in %prefix%_images (search for your file name in image_path column) and %prefix%_images_links

Thank you! It works very well now.

Is it possible to restrict access to options from an add-on to administrators only, so vendors can't see / change these?

What are "options from an add-on"? Do you mean addon settings?

If so, the answer is yes, if the addon supports it by adding a DB entry (or schema entry) and a default (enable/disable) for administrative groups. You should then see it in the usergroup permissions for admin groups.