close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Display page price range

Thread began 10/06/2014 11:59 am by Patrice | Last modified 10/06/2014 3:30 pm by Patrice | 2763 views | 19 replies |

PatriceWebAssist

Display page price range

Client has 3 price ranges on products but he only wants to show the smallest quantity on the display page instead of the range. Image attached that is photo-shopped to show his request. What do I need to edit in code to limit to just one price, not all? Thanks as always.

Sign in to reply to this post

Jason ByrnesWebAssist

looks like your using the grid results payout. so edit the webassist/plugins/catalog/results_grid.php page.

the code that is used to display the price on that page is:
<h3 class="price"><?php if(!($row_WADAProducts["ProductStock"] == 0 && $row_WADAProducts["ProductLive"] != 0 && $row_WADAProducts["ProductUnlimited"] == 0)) { ?>
<?php if( (isset($row_MaxMinPrice['MaxRetail']) && ($row_MaxMinPrice['MaxRetail'] != "") && $row_MaxMinPrice['MaxRetail'] > $ProductPrice)) { ?>
<span class="ProductRetailPrice errorText">Retail Price: <?php echo($WAGLOBAL_CurrencySymbol); ?><span id="ProductRetailPrice" class="strike"><?php echo number_format($row_MaxMinPrice['MaxRetail'], 2); ?></span></span>
<?php } else if ( isset($row_WADAProducts['ProductRetailPrice'] ) && ($row_WADAProducts['ProductRetailPrice'] != "") && $row_WADAProducts['ProductRetailPrice'] > $ProductPrice ){ ?>
<span class="ProductRetailPrice errorText">Retail Price: <?php echo($WAGLOBAL_CurrencySymbol); ?><span id="ProductRetailPrice" class="strike"><?php echo number_format($row_WADAProducts["ProductRetailPrice"], 2); ?></span></span>
<?php } else { ?><?php } ?>
<?php echo($WAGLOBAL_CurrencySymbol); ?><?php
if($row_MaxMinPrice["MinPrice"] > 0) {
echo number_format($row_MaxMinPrice["MinPrice"],2);
} else {
echo number_format($ProductPrice,2);
}
?><?php echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - " . $WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?><?php } else { echo "SOLD"; } ?></h3>



when there is a price range, it is this part that shows the price:

<?php echo($WAGLOBAL_CurrencySymbol); ?><?php
if($row_MaxMinPrice["MinPrice"] > 0) {
echo number_format($row_MaxMinPrice["MinPrice"],2);
} else {
echo number_format($ProductPrice,2);
}
?><?php echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - " . $WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?>

Sign in to reply to this post

PatriceWebAssist

Thanks... but I'm a bit lost. Do I replace the first batch with the second? And please note that ray did some custom for me to show the top line that is tied to "retail" which I don't want to lose.

So, if I am reading this right you are pointing out where the range comes from, not what I should change, correct?

Sign in to reply to this post

Jason ByrnesWebAssist

just change:
<?php echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - " . $WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?>

to:
<?php echo($WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?>

Sign in to reply to this post

PatriceWebAssist

OK... on that page this is what I have:

<h3 class="price"><?php if( (isset($row_MaxMinPrice['MinRetail']) && ($row_MaxMinPrice['MinRetail'] != ""))) { ?>
<span class="ProductRetailPrice">As low as <?php echo($WAGLOBAL_CurrencySymbol); ?><span id="ProductRetailPrice" ><?php echo number_format($row_MaxMinPrice['MinRetail'], 2); ?></span> per lb </span>
<?php } else if ( isset($row_WADAProducts['ProductRetailPrice'] ) && ($row_WADAProducts['ProductRetailPrice'] != "") && $row_WADAProducts['ProductRetailPrice'] > $ProductPrice ){ ?>
<span class="ProductRetailPrice errorText">As low as per lb: <?php echo($WAGLOBAL_CurrencySymbol); ?><span id="ProductRetailPrice"><?php echo number_format($row_WADAProducts["ProductRetailPrice"], 2); ?></span></span>
<?php } else { ?><?php } ?>
<?php echo($WAGLOBAL_CurrencySymbol); ?><?php
if($row_MaxMinPrice["MinPrice"] > 0) {
echo number_format($row_MaxMinPrice["MinPrice"],2);
} else {
echo number_format($ProductPrice,2);
}
?><?php echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - " . $WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?></h3>

starting at line 245

Using this, please tell me what to do... Way over my head. Thanks.

Sign in to reply to this post

PatriceWebAssist

We posted at same time.... I'm looking again.

Sign in to reply to this post

PatriceWebAssist

Tried this and got a red warning

<h3 class="price"><?php if( (isset($row_MaxMinPrice['MinRetail']) && ($row_MaxMinPrice['MinRetail'] != ""))) { ?>
<span class="ProductRetailPrice">As low as <?php echo($WAGLOBAL_CurrencySymbol); ?><span id="ProductRetailPrice" ><?php echo number_format($row_MaxMinPrice['MinRetail'], 2); ?></span> per lb </span>
<?php } else if ( isset($row_WADAProducts['ProductRetailPrice'] ) && ($row_WADAProducts['ProductRetailPrice'] != "") && $row_WADAProducts['ProductRetailPrice'] > $ProductPrice ){ ?>
<span class="ProductRetailPrice errorText">As low as per lb: <?php echo($WAGLOBAL_CurrencySymbol); ?><span id="ProductRetailPrice"><?php echo number_format($row_WADAProducts["ProductRetailPrice"], 2); ?></span></span>
<?php } else { ?><?php } ?>
<?php echo($WAGLOBAL_CurrencySymbol); ?><?php
if($row_MaxMinPrice["MinPrice"] > 0) {
echo number_format($row_MaxMinPrice["MinPrice"],2);
} else {
echo number_format($ProductPrice,2);
}
?> <?php echo($WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?> </h3>

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

PatriceWebAssist

thanks

Sign in to reply to this post

Jason ByrnesWebAssist

i commented the line:
<?php //echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - " . $WAGLOBAL_CurrencySymbol . number_format($row_MaxMinPrice["MaxPrice"],2):""); ?>

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...