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.
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
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.
Offline
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
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:
if (!(empty($proddisp['extrapricetext']))) {print $this->xhtml_encode($proddisp['extrapricetext']);}Offline
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
// +--
// | 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
You'll need to close out the if statement right after this line:
$display .= '<tr><td class="ecom_pricedisp_name">Our Price:</td>' . $eol;
Or, I would have done it like this. Change this line:
$display .= '<tr><td class="ecom_pricedisp_name">Our Price:</td>' . $eol;
To:
$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.
Offline
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