| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
HELP Wholesale Price Only | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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 |
|||||||
#3
|
|||||||
|
|||||||
![]() If you are still stuck on this you also need to edit add the following code to this file.
include/check_useraccount.php Code:
Hope that helps Ian
__________________
_____________________________________ 4.6.6 Gold Plus and 4.7.4 Gold MySQL server 5.6.29 PHP 5.5.34 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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 |
|||||||
#5
|
|||||||
|
|||||||
![]() 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 |
|||||||
#6
|
|||||||
|
|||||||
![]() 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 |
|||||||
#7
|
|||||||
|
|||||||
![]() You need to add a little in the /include/check_useraccount.php
at the end after Code:
add: Code:
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 |
|||||||
#8
|
|||||||
|
|||||||
![]() 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 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|