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

HELP Wholesale Price Only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-30-2005, 08:01 AM
 
floracal floracal is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 45
 

Default HELP Wholesale Price Only

I am setting up a cart for a wholesale only. I want everyone to see all products but no prices. I will issue user accounts to those that can buy wholesale and therefore see wholesale prices. I set up all the products with a zero value but because the wholesale price is higher than the zero retail nothing shows up. As soon as I enter retail price higher than a wholesale price it displays correctly?

this was the response from X-Cart BUT IT DID NOT WORK!!! what am i doing wrong

If you want to hide prices for unlogged customers and show prices for logged in customers which have the 'wholesale' membership, you can edit the '/customer/main/product.tpl' and '/customer/main/products.tpl' templates. You can add the following condition into these templates:

{if $login ne "" and $userinfo.membership eq "Wholesale"} ............... {/if}
__________________
X-Cart GoldPlus v4.7.12 PHP 7.4
X-Cart reBOOT (reDUX) Responsive Template
BCSE Paypal-DPM - BCSE Smooth Checkout
Reply With Quote
  #2  
Old 08-31-2005, 04:38 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You need to use that code around the price and add to cart button code. I have done this a few times for clients and it works great.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 09-05-2005, 02:17 AM
 
Ian Ian is offline
 

Senior Member
  
Join Date: Sep 2002
Location: Adelaide, South Australia
Posts: 127
 

Default

If you are still stuck on this you also need to edit add the following code to this file.

include/check_useraccount.php

Code:
$smarty->assign("user_membership",$user_account["membership"]);

Hope that helps
Ian
__________________
_____________________________________

4.6.6 Gold Plus
and 4.7.4 Gold
MySQL server 5.6.29
PHP 5.5.34
Reply With Quote
  #4  
Old 01-12-2006, 07:33 PM
 
bretto bretto is offline
 

Member
  
Join Date: Jan 2006
Posts: 12
 

Default

I'm stuck on this...i have sucessfully hidden the prices..but now its from everyone. Even wholesale members. Anyone else have any tips i can work with here?
__________________
X-Cart - 4.0.17
Reply With Quote
  #5  
Old 01-25-2006, 03:10 PM
 
all4q8 all4q8 is offline
 

Newbie
  
Join Date: Jul 2005
Posts: 9
 

Default

Hi there

Can you give me the cart button code because

I add this code : {if $login ne "" and $userinfo.membership eq "Wholesale"} ............... {/if}

around the price in '/customer/main/product.tpl' and '/customer/main/products.tpl' templates

also I add this code :

$smarty->assign("user_membership",$user_account["membership"]);
in include/check_useraccount.php

but i get this error :
Fatal error: Smarty error: [in customer/main/products.tpl line 5]: syntax error: unrecognized tag: background-color: #FEFCE4; border: 2px #FF8600 solid; (Smarty_Compiler.class.php, line 436) in c:\apache\htdocs\test\Smarty-2.6.9\Smarty.class.php on line 1088
__________________
x-cart-4.1.6 gold
Reply With Quote
  #6  
Old 04-17-2006, 04:34 PM
 
greg@3legs.com.au greg@3legs.com.au is offline
 

Newbie
  
Join Date: Apr 2006
Location: Australia
Posts: 5
 

Default Problem Persists - Hides from Everyone

I've followed all the instructions here, and like the previous poster, the buttons are hidden for all users.

I've tried experimenting - deliberately trying to assign...

$userinfo.membership = "Wholesale";

but it didn't work. Maybe its a cross-include parameter pasing/reading fault.

I'll keep experimenting, but would greatly appreciate a reply.
__________________
GR_AB_76
Using Version 4.0.15
Reply With Quote
  #7  
Old 04-17-2006, 04:52 PM
 
Ian Ian is offline
 

Senior Member
  
Join Date: Sep 2002
Location: Adelaide, South Australia
Posts: 127
 

Default

You need to add a little in the /include/check_useraccount.php

at the end after

Code:
x_session_save(); $smarty->assign("is_merchant_password", $is_merchant_password); $smarty->assign("login",$login); $smarty->assign("usertype",$current_area); $mail_smarty->assign("usertype",$current_area);

add:

Code:
$smarty->assign("pmembership",$user_account['membership']); $smarty->assign("user_membership",$user_account["membership"]);

That should make the rest of it work for you.

Ian
__________________
_____________________________________

4.6.6 Gold Plus
and 4.7.4 Gold
MySQL server 5.6.29
PHP 5.5.34
Reply With Quote
  #8  
Old 04-17-2006, 07:06 PM
 
greg@3legs.com.au greg@3legs.com.au is offline
 

Newbie
  
Join Date: Apr 2006
Location: Australia
Posts: 5
 

Default ==>> Managed to fix it <<==

I managed to find a fix. The problem is at the "read" end, that is, the wrong variable is being compared in the "if" statements. The code should be:

{if $login ne "" and $user_membership eq "Wholesale"} ............... {/if}

instead of:

{if $login ne "" and $userinfo.membership eq "Wholesale"} ............... {/if}

This worked for me.
__________________
GR_AB_76
Using Version 4.0.15
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 01:57 PM.

   

 
X-Cart forums © 2001-2020