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

Problem with hiding prices on variants only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-25-2007, 02:22 PM
 
kanjigirl kanjigirl is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 51
 

Default Problem with hiding prices on variants only

I've made a number of modifications to my client's cart based on what I've read here - I've edited customer/main/product.tpl and products.tpl so that prices will not show unless the user is logged in at the 'Wholesale' level.

This pricing scheme is *mostly* working. It's working on all the category pages, and it's hiding the 'buy now' button on the product page, but the one problem is the the price is being hidden on all product pages *except* the ones with variants. On those products I can see my 'you must be logged in to view prices' message flash for a fraction of a second and then the price appears.

I tried redefining wholesale prices for my variants, and that didn't help. I think they're set up correctly - I checked each box for each variant and assigned them to the 'Wholesale' membership level in the section at the bottom of the variants admin page, 'Modify wholesale prices for selected variants.'

Here's my code from customer/main/product.tpl that pertains to this, the 'paragraph' in the middle:

PHP Code:
<tr><td class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</td>
<
td valign="top">
{if 
$product.taxed_price ne 0 || $variant_price_no_empty}
<
font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">

{* 
THIS IS THE LOGIN REQUIREMENT *}
{if 
$login eq "" or $user_membership ne "Wholesale" }You must be logged in as a wholesale buyer to view prices.
{else}

{include 
file="currency.tpl" value=$product.taxed_price plain_text_message=true}</span></font><font class="MarketPrice"> <span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true}
{/if}
</
span></font


Again, this is working perfectly for everything but variants.

Do I have this set up incorrectly? if not, how do I work it so my products with variants abide by the wholesale price rule?
__________________
Debbie Campbell
www.redkitecreative.com
X-Cart Version 4.1.6
Reply With Quote
  #2  
Old 04-25-2007, 02:55 PM
 
hooter hooter is offline
 

X-Adept
  
Join Date: Dec 2004
Posts: 519
 

Default Re: Problem with hiding prices on variants only

Hi Kanji,

Yes, the wholesale variants is a bit confusing - it is not tied to membership level, but rather it gives you the ability to offer discounted pricing on multiple items.

The file you want to look at to hide the product variants based on your criteria is in /skin1/modules/Product_Options/product_variants.tpl
__________________
Blog for X-Cart | Ebay Auction Manager
Reply With Quote
  #3  
Old 04-25-2007, 03:44 PM
 
kanjigirl kanjigirl is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 51
 

Default Re: Problem with hiding prices on variants only

I'm looking at this file (/skin1/modules/Product_Options/product_variants.tpl) but I don't understand where in this template I'm supposed to make the modification to *not* show prices unless the user is logged in at the wholesale level. Isn't this the page from the Admin section?

If I can't get this to work, is the alternative to change my variants to regular products? That's going to take a lot of time.
__________________
Debbie Campbell
www.redkitecreative.com
X-Cart Version 4.1.6
Reply With Quote
  #4  
Old 04-25-2007, 04:01 PM
 
hooter hooter is offline
 

X-Adept
  
Join Date: Dec 2004
Posts: 519
 

Default Re: Problem with hiding prices on variants only

I'm sorry Kanji,

I may have given you erroneous info, I'm in a bit of a rush right now but will come back to this thread if someone hasn't already answered your question properly.
__________________
Blog for X-Cart | Ebay Auction Manager
Reply With Quote
  #5  
Old 04-30-2007, 09:43 AM
 
kanjigirl kanjigirl is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 51
 

Default Re: Problem with hiding prices on variants only

Anyone? This is kind of a big deal for me... is there another way to assign options to an item without using variants? Can I assign colors or styles as regular options with price-changing but just leave the price change at + or - 0.00?
__________________
Debbie Campbell
www.redkitecreative.com
X-Cart Version 4.1.6
Reply With Quote
  #6  
Old 04-30-2007, 11:02 AM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Problem with hiding prices on variants only

Variant Prices are loaded through JavaScript using the "product_price" id. Try the code as it is below. I did not test this, and it may cause a Javascript error, in which case I believe you will need to edit the skin1/modules/Product_Options/func.js file.

Code:
<tr><td class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</td> <td valign="top"> {if $product.taxed_price ne 0 || $variant_price_no_empty} {* THIS IS THE LOGIN REQUIREMENT *} {if $login eq "" or $user_membership ne "Wholesale" }You must be logged in as a wholesale buyer to view prices. {else} <font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">{include file="currency.tpl" value=$product.taxed_price plain_text_message=true}</span></font><font class="MarketPrice"> <span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true} {/if} </span></font>
Reply With Quote
  #7  
Old 05-04-2007, 07:58 AM
 
kanjigirl kanjigirl is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 51
 

Default Re: Problem with hiding prices on variants only

That did it - thank you so much!
__________________
Debbie Campbell
www.redkitecreative.com
X-Cart Version 4.1.6
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 03:47 PM.

   

 
X-Cart forums © 2001-2020