Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 02-16-2012 12:00:41

jensme
Member
Registered: 04-29-2010
Posts: 392

Creating Price Display Logic

How do I tell the price display include that if I'm on a product list display, do one thing; if I'm on a product detail display, do another?

Offline

 

#2 02-16-2012 21:47:12

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Creating Price Display Logic

In your Product Price Display you will need the following lines, the first if it is not present should go in the top sections of the php variables :

Code:

$ns        = $this->globals('core.namespace');

once this line is present then the rest would need to be like (basically something like this line for each price type you want to control):

Code:

 if ($ns == 'prodshow') {

   // what to do on a product detail page.

 } else {

  // what to do for every other page.

} // end of if statement.

John

Offline

 

#3 02-17-2012 13:58:43

jensme
Member
Registered: 04-29-2010
Posts: 392

Re: Creating Price Display Logic

Hm.  It's picking up the same display for related products.  Is there another way?

Offline

 

#4 02-19-2012 16:31:58

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Creating Price Display Logic

The related products are built thru the namespace of prodshow since it is part of the original product display call and right now I know of no way to limit that without making a mod to the core script ECOM_Prod.php.

John

Offline

 

#5 02-19-2012 16:55:59

jensme
Member
Registered: 04-29-2010
Posts: 392

Re: Creating Price Display Logic

Thanks.  You know what I did that I never realized I could do in 3 years?  I just  made two NEW display includes for each and kept the original.  Seems to be working fine!

Offline

 

Board footer