Add button to product entry grid?

2 replies·opened Oct 27, 2016
M
maccapperOct 27, 2016

Hello - here is the code I have for a search results page. I'd like to add the button (price) in the open space on the first result.

Code for row 1:

              <div class="entry product clearfix">
                <div class="entry-image">
                  <div class="fslider" data-arrows="false" data-lightbox="gallery">
                    <div class="flexslider">
                      <div class="slider-wrap">
                        <?php //image thumbnails
                            unset($images);
                            if (!empty($row['images'])) {
                              $images = explode(",", $row['images']);
                              //$images = str_replace(' ', '', $images);
                              $counted = count($images);
                              $fullpath = "equipment/".$images[0];
                            }
                            if (isset($images)) {
                              if (file_exists($fullpath)) {
                                echo '<div class="slide"><a href="'.$fullpath.'" data-lightbox="image"><img class="image_fade" src="'.$fullpath.'" alt="ALT TAG HERE"></a></div>';
                                $counted--;
                                $i=1;
                                while($i<=$counted) {
                                  if ($images[$i] != "") {
                                    echo '';
                                      }
                                  $i++;
                                }
                              } else { echo "File Error!
".$fullpath; }
                            } else {
                              echo '<img class="image_fade" src="images/photo_not_available-lg.jpg" alt="Sorry - there is no image available."  />';
                            }
                          // Destroy the $images variable after each loop to prevent duplicate thumbnails
                          unset($images);
                          ?>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="entry-c">
                  <div class="entry-title product-price">
                    <h2><a href="#"><?php echo $row['year']; ?> <?php echo $row['make']; ?> <?php echo $row['model']; ?></a> </h2>
                  </div>
                  <ul class="entry-meta clearfix">
                    <li><i class="icon-map-marker2"></i><a href="#"><?php echo $row['location']; ?></a> (<a href="https://maps.google.com/maps?q=Macomb+IL" data-lightbox="iframe">view map</a>)</li>
                    <li><i class="icon-line-tag"></i><a href="#">Tag #: <?php echo $row['tag']; ?></a></li>
                    <li><i class="icon-picture"></i> <?php echo $counted; ?></li>
                  </ul>
                  <div class="entry-content">
                    <p><?php echo $row['description']; ?></p>
                  </div>
                </div>
              </div>

And here is the button code I can't figure out how to combine with the above code:

    <div class="col-md-3 col-sm-4 center product-price">
      <a href="#"class="button button-3d button-xlarge button-rounded button-white button-light product-price"><i class="icon-dollar"></i>49.99</a>
    </div>
M
maccapperOct 27, 2016

Here is the screenshot

S
SemiColonWebSTAFFNov 2, 2016

Hello,

This is Definitely Possible. Please consider adding the following code directly inside the .entry-c DIV:

<a href="#" class="button button-3d button-xlarge button-rounded button-white button-light" style="position: absolute; top: 0; right: 0;"><i class="icon-dollar"></i>49.99</a>

This will definitely work fine. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard