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 06-17-2015 10:01:09

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Product options and display prices

Hi all

Is it possible to remove the '+ £xx.xx' from the various product options and have the displayed price (not the Your Total) automatically update?

It is probably just me, but I don't like the look and feel of having the options show as a selection list with all of those additions and subtractions. It would, I feel, look better if the price updated.

Thanks

Terry

Offline

 

#2 06-18-2015 06:19:15

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19951
Website

Re: Product options and display prices

You'll see the code for the options in the {private}/apps/ecom/ECOM_Prod/ECOM_Prod.php file.  Look in the prodloadopt() function for the commented sections labeld price increases and decreases.

If both prices bother you, I'd probably just use some CSS to suppress the price and leave the Your Total running as it is.


Nick Hendler

Offline

 

#3 06-18-2015 07:23:09

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Product options and display prices

Nick

Following on from this, I've removed the prices from the Product Options and showing Your total. How do I amend the Your Price box title to read Prices From? This I want to show only on certain items, I don't want to change it for every item.

Thanks

Terry

Offline

 

#4 06-19-2015 06:44:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19951
Website

Re: Product options and display prices

Use Raw DB Admin to 'Maintain' the ecom_prod table.  Add a new column to it with the id 'extrapricetext'.  Set it up as an 'varchar' with a length of 100, make it NOT required, name it 'Special Pricing Text' and set it's section to 'Pricing'.  Now you'll have a new field named 'Special Pricing Text' in your admin under Manage Products in the pricing tab.

Add text to the items you want.  When you're done, you can edit pricedisp.php and put that text anywhere you like with:

Code:

if (!(empty($proddisp['extrapricetext']))) {print $this->xhtml_encode($proddisp['extrapricetext']);}

Nick Hendler

Offline

 

#5 06-19-2015 10:37:31

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Product options and display prices

Nick

Thanks for that. I've amended your idea slightly so that 'Our Price' is changed to 'Prices From'. I don't know if its the best way of doing it, but it works for me.

Terry

Code:

// +--
// | Display regular prices.
// +--

} elseif ((!(empty($priceinfo['type']))) && ($priceinfo['type'] == 'R')) {

     $displayb  = $this->xhtml_encode($priceinfo['displayb']);
     $displayb  = preg_replace('/' . $price_preg . '/', $price_repl, $displayb);

// +--
// | Added 19th June 2015 - Changes Our Price: to Prices From: if Special Price Text is set.
// +--

if (!(empty($proddisp['extrapricetext'])))
{     $display .= '<tr><td class="ecom_pricedisp_name">Prices From:</td>' . $eol;
}

else

// +---

     $display .= '<tr><td class="ecom_pricedisp_name">Our Price:</td>' . $eol;
     $display .= '<td class="ecom_pricedisp_price">' . $displayb . '</td></tr>' . $eol;

Offline

 

#6 06-22-2015 07:22:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19951
Website

Re: Product options and display prices

You'll need to close out the if statement right after this line:

Code:

$display .= '<tr><td class="ecom_pricedisp_name">Our Price:</td>' . $eol;

Or, I would have done it like this.  Change this line:

Code:

$display .= '<tr><td class="ecom_pricedisp_name">Our Price:</td>' . $eol;

To:

Code:

$custom = 'Our Price'; if (!(empty($proddisp['extrapricetext']))) {$custom = $this->xhtml_encode($proddisp['extrapricetext']);}
$display .= '<tr><td class="ecom_pricedisp_name">' . $custom . ':</td>' . $eol;

It's just a little cleaner, and let's you customize the text in the DB.


Nick Hendler

Offline

 

#7 06-22-2015 09:24:23

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Product options and display prices

Nick

Thanks for your suggestion. I'd closed out the if statement, just forgot to include it in the code I pasted on here.

It is neater code and I've altered mine to suit.

Terry

Last edited by tguswell (06-22-2015 09:36:35)

Offline

 

Board footer