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

Display Product Prices not Variant Prices on products page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-13-2005, 10:36 AM
 
grnyj93 grnyj93 is offline
 

Advanced Member
  
Join Date: Nov 2004
Location: US
Posts: 38
 

Default Display Product Prices not Variant Prices on products page

What do I need to change in my templates to display the list_price and price from the products detail page (in admin section) on the products/category pages in the front end regardless of whether it has variants or not.

I have products set up as follows:

product list_price: $99.99
product price: $89.99

variant 1 (actual product) list_price: $99.99
variant 1 (actual product) price: $89.99

variant 2 (repair kit for product) list_price: $4.99
variant 2 (repair kit for product) price: $3.99

Problem is that on the products/category page as well as in the featured products it will display:

Product list_price; $99.99
variant 2 price: $3.99
And show a discount of 96%

Very misleading.

I need it to have it display the list_price and price from the main product (not the cheapest variant) so that I can show the pricing for the product and not the list_price of the product and the price of the repair kit.

I have searched the forum and found this problem posted a few times with no fixes.

I would just like to know where in the code I need to edit so that it doesn't display pricing from the variants on the products/category pages.

Thanks,
Jason.
__________________
x-cart 4.0.13
Reply With Quote
  #2  
Old 09-16-2005, 02:39 PM
 
grnyj93 grnyj93 is offline
 

Advanced Member
  
Join Date: Nov 2004
Location: US
Posts: 38
 

Default

Am I not making sense? Or is there really no one here who knows where to manipulate xcart so that it always pulls the pricing (list price and actual price) from the main product and not the variants.

Help please. I can't have a product that says it is on sale for 96% off the list price because of this.
__________________
x-cart 4.0.13
Reply With Quote
  #3  
Old 09-22-2005, 06:54 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

In include/search.php

FIND:

Code:
if($products[$k]['descr'] == strip_tags($products[$k]['descr'])) $products[$k]['descr'] = str_replace("\n"," ",$products[$k]['descr']); if($products[$k]['fulldescr'] == strip_tags($products[$k]['fulldescr'])) $products[$k]['fulldescr'] = str_replace("\n"," ",$products[$k]['fulldescr']);

After put:

Code:
$tempid = $products[$k]['productid']; $maxprice = func_query_first("SELECT price FROM $sql_tbl[pricing] WHERE quantity='1' AND productid='$tempid' AND membership=''"); if ($maxprice[price] > 0) { $products[$k]['maxprice'] = $maxprice[price]; } else { $products[$k]['maxprice'] = $products[$k]['price']; }

Then use $products[whatever].maxprice in your templates.
Reply With Quote
  #4  
Old 09-22-2005, 06:57 AM
 
grnyj93 grnyj93 is offline
 

Advanced Member
  
Join Date: Nov 2004
Location: US
Posts: 38
 

Default

Thanks for the help. I appreciate it.

Jason.
__________________
x-cart 4.0.13
Reply With Quote
  #5  
Old 09-22-2005, 10:45 AM
 
grnyj93 grnyj93 is offline
 

Advanced Member
  
Join Date: Nov 2004
Location: US
Posts: 38
 

Default

I implimented the mod and it appears to be working perfectly - Thanks a ton for the help.
__________________
x-cart 4.0.13
Reply With Quote
  #6  
Old 09-26-2005, 10:41 PM
 
thumbsatplay thumbsatplay is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 32
 

Default

Is this a bug? It sounds like a bug to me......I tried a different scenario.

1. Create a product with 2 variants.
2. Modify the quantity in stock for the first variant to 5 or something greater than 1
3. Modify the quantity in stock for the second variant to 0

When I see that product under it's category, it says "Out Of Stock".

I'm going to log a support ticket and will update this.
__________________
X-Cart Version: 4.0.17
Operating System: Linux
Add Ons: N/A
URL: http://www.thumbsatplay.com
Reply With Quote
  #7  
Old 09-27-2005, 06:09 AM
 
grnyj93 grnyj93 is offline
 

Advanced Member
  
Join Date: Nov 2004
Location: US
Posts: 38
 

Default

Good point, I hadn't thought about it being a bug. Definetely let us know how it goes.
__________________
x-cart 4.0.13
Reply With Quote
  #8  
Old 09-27-2005, 04:10 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Many people have complained about this, but x-cart says it is a "feature" that is working as it should.
Reply With Quote
  #9  
Old 10-04-2005, 01:04 PM
 
thumbsatplay thumbsatplay is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 32
 

Default

I logged a ticket with X-cart and they uploaded a fix (patch) into my file area. If enough people log a ticket, perhaps, they will realize that the feature in its current state is rather useless.

I said in my ticket if I had two variants A and B and A was In Stock, and B was Out Of Stock, then B would show up in the products list page; on the product details page, Product A shows up. This functionality is useless because if Product B is out of stock, and the products list page shows it as Out Of Stock, then customers are not going to drill down to see if there is another variant In Stock (Product A). They will just say, "Well, that's out of stock" and move on.
__________________
X-Cart Version: 4.0.17
Operating System: Linux
Add Ons: N/A
URL: http://www.thumbsatplay.com
Reply With Quote
  #10  
Old 10-04-2005, 09:21 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

Hi thumbsatplay,

Could you pls share the solution ?
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 05:17 PM.

   

 
X-Cart forums © 2001-2020