if then help
4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 14, 2017 (RSS)
By dccreatives - April 5, 2017
If search results are an item that is quickship, I want it to show that a quickship image, otherwise, it should show main image. Here is my code. I dont think i have tags nestled correctly.
<?php if ($record['quick_ship']): ?> <?php foreach ($record['quickship_image'] as $upload): ?>
<?php if ($upload['isImage']): ?>
<a href="<?php echo $record['link'] ?>"><img src="<?php echo $upload['urlPath'] ?>" alt="" class="img-bord" width="150" height="150" border="0" /></a>
<?php endif ?> <?php endforeach ?>
<?php else: ?>
<?php foreach ($record['main_image'] as $upload): ?>
<?php if ($upload['isImage']): ?>
<a href="<?php echo $record['link'] ?>"><img src="<?php echo $upload['urlPath'] ?>" alt="" class="img-bord" width="150" height="150" border="0" /></a> <?php endif ?>
<?php break; ?>
<?php endforeach ?>
What is wrong with my code?
By dccreatives - April 5, 2017
on this page:
http://www.axislighting.com/CMS/search_products.php, I can further sort by selecting quickship and viewing only items that are quickship like this:
http://www.axislighting.com/CMS/search_products.php?quickship=quickship
Now, I want that if quickship is selected, I can organize the listings by mountings. Can this be done with an if then statement. Here are the files.
Now important to note, this should be sorted only when quickship is selected. Otherwise should look like the search_products.php page.
By ross - April 14, 2017
Thanks for posting your solution :)
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/