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)
-   -   HELP Wholesale Price Only (https://forum.x-cart.com/showthread.php?t=16239)

floracal 08-30-2005 08:01 AM

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}

balinor 08-31-2005 04:38 AM

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.

Ian 09-05-2005 02:17 AM

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

bretto 01-12-2006 07:33 PM

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?

all4q8 01-25-2006 03:10 PM

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

greg@3legs.com.au 04-17-2006 04:34 PM

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.

Ian 04-17-2006 04:52 PM

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

greg@3legs.com.au 04-17-2006 07:06 PM

==>> 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.