Jump to content

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

Editing Vendor Permissions Rate Topic   * * * * * 1 votes

 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 28 July 2015 - 06:41 PM #1

Which files need modification to edit the vendor page? (website.com/Vendor.php)

I want to remove features such as adding pages/categories/files etc...

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

Posted 29 July 2015 - 08:54 AM #2

Permissions can be corrected in the following file:

app\schemas\permissions\vendor_multivendor.php

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 29 July 2015 - 08:52 PM #3

So for example, what do I do to get rid of the Content menu from the vendor page so that they can't create new pages, or get rid of the file manager so they can't upload/view files?

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

Posted 30 July 2015 - 09:52 AM #4

For example, change

'pages' => array (
		    'modes' => array(
			    /*'m_add' => array(
				    'permissions' => false,
			    ),
			    'm_update' => array(
				    'permissions' => false,
			    ),*/
		    ),
		    'permissions' => true,
	    ),

to

'pages' => array (
            'permissions' => false,
	    ),

Clear the cache and check the result

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 30 July 2015 - 06:19 PM #5

works like a charm. THank you again!

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

Posted 31 July 2015 - 08:36 AM #6

Glad to hear that!

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 31 July 2015 - 07:43 PM #7

I have one more question: Which one do I edit to add "Apply for Vendor Account" on the vendor.php page (login page)? I'm guessing its not part of a theme. I looked in design/backend but I was unable to locate a template.

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

Posted 03 August 2015 - 08:25 AM #8

I have one more question: Which one do I edit to add "Apply for Vendor Account" on the vendor.php page (login page)? I'm guessing its not part of a theme. I looked in design/backend but I was unable to locate a template.


design\backend\templates\views\auth\login_form.tpl

{if $smarty.const.ACCOUNT_TYPE == 'vendor'}
    your code here
{/if}

do not forget to clear cache then

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 03 August 2015 - 06:32 PM #9

This is my login_form.tpl and doesn't have what you said. I do not want to change the administration panel too. How do I add "Apply for vendor" under "forgot Password?" in vendor.php?

<div class="modal signin-modal">
    <form action="{""|fn_url}" method="post" name="main_login_form" class=" cm-skip-check-items cm-check-changes">
	    <input type="hidden" name="return_url" value="{$smarty.request.return_url|fn_url:"A":"rel"|fn_query_remove:"return_url"}">
	    <div class="modal-header">
		    <h4><a href="{""|fn_url}">{$settings.Company.company_name|truncate:40:'...':true}</a></h4>
		    <span>{__("administration_panel")}</span>
	    </div>
	    <div class="modal-body">
		    <div class="control-group">
			    <label for="username" class="cm-trim cm-required cm-email">{__("email")}:</label>
			    <input id="username" type="text" name="user_login" size="20" value="{if $stored_user_login}{$stored_user_login}{else}{$config.demo_username}{/if}" class="cm-focus" tabindex="1">
		    </div>
		    <div class="control-group">
			    <label for="password" class="cm-required">{__("password")}:</label>
			    <input type="password" id="password" name="password" size="20" value="{$config.demo_password}" tabindex="2" maxlength="32">
		    </div>
	    </div>
	    <div class="modal-footer">
		    {include file="buttons/sign_in.tpl" but_name="dispatch[auth.login]" but_role="button_main" tabindex="3"}
		    <a href="{"auth.recover_password"|fn_url}" class="pull-right">{__("forgot_password_question")}</a>
	    </div>
    </form>
</div>

Thank you.

 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 03 August 2015 - 06:35 PM #10

Oh, I understand what you are saying now. Nevermind about the post above. Thank you

 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 03 August 2015 - 06:43 PM #11

So I added this:
{if $smarty.const.ACCOUNT_TYPE == 'vendor'}
    <a href="{"companies.apply_for_vendor?return_previous_url=`$return_current_url`"|fn_url}" class="pull-right" rel="nofollow">{__("apply_for_vendor_account")}</a>
   {/if}
but When I click it, it says I must be logged in first to use this resource. How do I correct this issue?

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

Posted 04 August 2015 - 11:05 AM #12

Please use

{if $smarty.const.ACCOUNT_TYPE == 'vendor'}
    <a href="{"companies.apply_for_vendor?return_previous_url=`$return_current_url`"|fn_url:'C'}" class="pull-right" rel="nofollow">{__("apply_for_vendor_account")}</a>
   {/if}

And do not forget to clear cache

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 05 August 2015 - 10:42 AM #13

It works flawlessly; thank you. Can you also tell me where the templates are for adding a product? I would like to remove some features and get rid of duplicate options such as images (for example, there are options to add images in the tab "images" and in the general tab.)

 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 07 August 2015 - 07:54 PM #14

for the vendor page and the admin page.

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

Posted 11 August 2015 - 11:22 AM #15

It works flawlessly; thank you. Can you also tell me where the templates are for adding a product? I would like to remove some features and get rid of duplicate options such as images (for example, there are options to add images in the tab "images" and in the general tab.)


For the required changes please change the following template:

design/backend/templates/views/products/update.tpl

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 13 August 2015 - 01:13 AM #16

Thank you.

Another question:
How I do add features and shipping options when I create products? I can only edit those elements AFTER I create them. Is there any way to make it so that I can edit it as I create it?

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

Posted 13 August 2015 - 07:32 AM #17

Try the following solution. (!) Not tested

Open the app/controllers/backend/products.php file and replace:

// [Page sections]
	Registry::set('navigation.tabs', array (
		'detailed' => array (
			'title' => __('general'),
			'js' => true
		),
		'images' => array (
			'title' => __('images'),
			'js' => true
		),
		'seo' => array(
			'title' => __('seo'),
			'js' => true
		),
		'qty_discounts' => array (
			'title' => __('qty_discounts'),
			'js' => true
		),
		'addons' => array (
			'title' => __('addons'),
			'js' => true
		),
	));
	// [/Page sections]

with

// [Page sections]
	$tabs = array (
		'detailed' => array (
			'title' => __('general'),
			'js' => true
		),
		'images' => array (
			'title' => __('images'),
			'js' => true
		),
		'seo' => array(
			'title' => __('seo'),
			'js' => true
		),
		'qty_discounts' => array (
			'title' => __('qty_discounts'),
			'js' => true
		),
		'addons' => array (
			'title' => __('addons'),
			'js' => true
		),
		'shippings' => array (
			'title' => __('shipping_properties'),
			'js' => true
		),
	);

    list($product_features, $features_search) = fn_get_paginated_product_features(array(), $auth, array(), DESCR_SL);
    if (!empty($product_features)) {
        $tabs['features'] = array(
			'title' => __('features'),
			'js' => true
		);
	}
    Registry::set('navigation.tabs', $tabs);
    // [/Page sections]

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • technoob
  • Senior Member
  • Trial users
  • Join Date: 08-Jun 15
  • 309 posts

Posted 13 August 2015 - 04:24 PM #18

great tips

 
  • multiles
  • Member
  • Members
  • Join Date: 08-Jul 15
  • 23 posts

Posted 15 August 2015 - 07:03 PM #19

Tahnk you. I also added
'options' => array (
	  'title' => __('options'),
	  'js' => true
    ),

But the tab is empty. What can I do to fix that?

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

Posted 17 August 2015 - 09:25 AM #20

Tahnk you. I also added

'options' => array (
	  'title' => __('options'),
	  'js' => true
	),

But the tab is empty. What can I do to fix that?


Custom controller is used to add product options to the database. It means that this controller should receive product_id in the request parameters. So you cannot add option on the "Add product" page

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.