Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

common if/then modifications I make to x-cart...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 06-07-2005, 05:07 PM
  AgileMolecule's Avatar 
AgileMolecule AgileMolecule is offline
 

Member
  
Join Date: May 2005
Posts: 28
 

Default

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!
__________________
\"We have only scratched the surface of Mars\"...

Jim Garvin

X-Cart version 4.0.13
Reply With Quote
  #12  
Old 06-08-2005, 05:25 AM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default thanks

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
__________________
Instinctual
8,000 feet up in the Rocky Mountains of Colorado
X-Cart Versions 3.5.x - 4.0.x

IF you xcart, THEN you prosper, ELSE you fail. ELSEIF xcart fails, THEN you fix it, all the WHILE {loop}\'ing {section}\'s to feed your $smarty mind.
Reply With Quote
  #13  
Old 06-15-2005, 08:49 PM
 
maineiac maineiac is offline
 

Member
  
Join Date: Jun 2005
Location: USA
Posts: 29
 

Default

Instinctual,

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?

Quote:
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

x-cart gold v4.0.18
x-cart gold v4.1.8
Reply With Quote
  #14  
Old 06-15-2005, 10:10 PM
 
maineiac maineiac is offline
 

Member
  
Join Date: Jun 2005
Location: USA
Posts: 29
 

Default

Quote:
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
Code:
if ($login == "master"){}
in admin/users_tools.php. For example:
Code:
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")); } }
__________________
maineiac

x-cart gold v4.0.18
x-cart gold v4.1.8
Reply With Quote
  #15  
Old 06-16-2005, 05:47 AM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default 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
8,000 feet up in the Rocky Mountains of Colorado
X-Cart Versions 3.5.x - 4.0.x

IF you xcart, THEN you prosper, ELSE you fail. ELSEIF xcart fails, THEN you fix it, all the WHILE {loop}\'ing {section}\'s to feed your $smarty mind.
Reply With Quote
  #16  
Old 10-09-2005, 12:54 PM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default

bump.

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
__________________
Instinctual
8,000 feet up in the Rocky Mountains of Colorado
X-Cart Versions 3.5.x - 4.0.x

IF you xcart, THEN you prosper, ELSE you fail. ELSEIF xcart fails, THEN you fix it, all the WHILE {loop}\'ing {section}\'s to feed your $smarty mind.
Reply With Quote
  #17  
Old 10-09-2005, 01:10 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

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

- Mike
__________________
4.1.9
Reply With Quote
  #18  
Old 10-21-2005, 01:59 PM
 
chrisinoz chrisinoz is offline
 

eXpert
  
Join Date: Aug 2004
Location: Australia
Posts: 248
 

Default

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!

Cheers

Chris

4.03 - 4.016
Reply With Quote
  #19  
Old 10-21-2005, 02:06 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

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

- Mike
__________________
4.1.9
Reply With Quote
  #20  
Old 10-21-2005, 04:11 PM
 
chrisinoz chrisinoz is offline
 

eXpert
  
Join Date: Aug 2004
Location: Australia
Posts: 248
 

Default

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.

Cheers

Chris
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:11 AM.

   

 
X-Cart forums © 2001-2020