![]() |
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} |
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.
|
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 |
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?
|
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 |
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. |
You need to add a little in the /include/check_useraccount.php
at the end after Code:
x_session_save(); add: Code:
$smarty->assign("pmembership",$user_account['membership']); That should make the rest of it work for you. Ian :D |
==>> 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. |
All times are GMT -8. The time now is 02:18 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.