X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   common if/then modifications I make to x-cart... (https://forum.x-cart.com/showthread.php?t=8881)

AgileMolecule 06-07-2005 05:07 PM

Hey Instinctual-
I want to let you know that a couple of your tips were just what I needed to really get a handle on how to get working with Smarty and XCart.

Sometimes a tiny little bit of data is all that is needed to get a whole new chapter of learning started.

Thanks much!

instinctual 06-08-2005 05:25 AM

Thanks - always appreciate the comments - this thread seems to live long and prosper ;o) I'll try and take some more time to keep adding to it :roll:

maineiac 06-15-2005 08:49 PM


Thank You for these excellent tips! I am a newbie to Xcart and your instructions have helped me tremendously during this learning stage while modding the cart for my purposes.

I am wondering what happened to #3, or am I just missing something here?


3. Sometimes I don't want my "store admins" to be able to create new administrators - - - sounds easy to do with the logic above, but you don't want to just take out the link "users" because that disables the ability for them to administrate their customers as well. So this fix makes it so that the "manage administrators" link dissapears while keeping the "manage customers" link intact. This is a tricky fix... I'm running out the door but will post this fix and more later tonight.

Using xcart v4.0.13 I am creating a new admin level based on the 'Fulfillment staff' templates. I've created a new directory and inserted home.tpl and menu.tpl in it to show only what I want this level of admin to see. So far so good - it works! Now I run into the problem of the "In this section" dialog box under "Users Management". I want to hide some of those links - in particular the ability to create new admins!

I think I have it narrowed down to dialog_tools.tpl, but cannot get any further...

Many thanks in advance for any help you can offer!

maineiac 06-15-2005 10:10 PM


Now I run into the problem of the "In this section" dialog box under "Users Management". I want to hide some of those links - in particular the ability to create new admins!
Solved by surrounding the links I do not wish this admin level to see with

if ($login == "master"){}
in admin/users_tools.php. For example:

if ($login == "master"){
if (empty($active_modules["Simple_Mode"])) {
        $dialog_tools_data["left"][] = array("link" => "user_add.php?usertype=A", "title" => func_get_langvar_by_name("lbl_create_admin_profile"));
        $dialog_tools_data["left"][] = array("link" => "user_add.php?usertype=P", "title" => func_get_langvar_by_name("lbl_create_provider_profile"));
else {
        $dialog_tools_data["left"][] = array("link" => "user_add.php?usertype=P", "title" => func_get_langvar_by_name("lbl_create_admin_profile"));

instinctual 06-16-2005 05:47 AM

ah yes
Ah, yes, sorry I didn't get back to you in time, excellent work ;o)

I usually disable the whole "see also" section up there as well, in dialog_tools.tpl by just commenting out that <td> that they're in.

Thanks for adding to the post!

instinctual 10-09-2005 12:54 PM


Since editing a post doesn't seem to affect the last post date, I'm shamelessly bumping this post to let you all know I've added to it and edited it.

I like to keep it all in one simple post so I always edit the first one here ;o)

Cheers :P

mffowler 10-09-2005 01:10 PM

Cheers! I always have a use for your offerings....

- Mike

chrisinoz 10-21-2005 01:59 PM

Hi Instinctual

What a wonderful post. Most appreciated.

I was asking about one of these in the forum and Patraick pointed me here however I can not get this very simple one to work

{if $user_membership eq "Premium"} display this {/if}

I setup test user and attributed xcart default Premium membership to it and get a blank.

Checked db and it attributes Premium to this user.

Tried this in 4.014 and 4.016

Scratching head here.

Can't see what I am missing here!



4.03 - 4.016

mffowler 10-21-2005 02:06 PM

Do you have it set so that you need to "approve" membership?

- Mike

chrisinoz 10-21-2005 04:11 PM

Hi Mike

Thx for reply

I went to my test site - still 4.04 and setup a user in Wholesale Membership.

When I login it recognises the login and shows me a wholesale price I setup so I know that xcart is recognising that group.

So I added {if $user_membership eq "Wholesale"} display this {/if}

to customer/home.tpl

Yet it shows nothing on screen.

BTW I did not know you could set it to approve membership but I don''t see that as a problem here.



All times are GMT -8. The time now is 03:36 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.