Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Templates, Stylesheets, Page Layout / Move 'additional photos' and 'add to cart' button on showbook page

Move 'additional photos' and 'add to cart' button on showbook page

Started by johnnycopilot on 26 Feb 2013, 2:17 AM · Views: 891

Results 1 to 6 of 6
26 Feb 2013, 2:17 AM
#1
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Move 'additional photos' and 'add to cart' button on showbook page

I have Zen v1.5.0 . I am using Crista template from Pixemus. On my showbook page, the product description starts on the Right of the main product photo, and then wraps around to the left below the main product photo. My 'more photos' and the 'add to cart' button are down at the very bottom of the description. I don't care if the text wraps, I just want to move the 'add to cart' and 'additional photos'..... Here is a product on the website I want to edit, that has two additional photos http://www.wholesalebodyboards.com/index.php?main_page=product_info&cPath=40_51&products_id=129 . I would like for the layout to look like this page from another site of mine, or at least similar. I have access to all of the files in this other site, in case that will help. They are different templates, but from the same company.. if that helps.. http://www.stageandtheaterlighting.com/index.php?main_page=product_info&cPath=10_12&products_id=60 I would love to have my 'add to cart' button on the left, just below the main product photo, and the additional images just below that. Any help would be greatly appreciated! Thanks!!!

26 Feb 2013, 2:55 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Move 'additional photos' and 'add to cart' button on showbook page

Why don't you grab a copy from your other site of the custom template file "tpl_product_info_display.php" and load it into your template on the board site -
don't delete the one that exists just rename it to like "tpl_product_info_display.off"

Zen-Venom Get Bitten

26 Feb 2013, 3:01 AM
#3
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Move 'additional photos' and 'add to cart' button on showbook page

ok Kobra, I will do that right now. I will post back and let you know what happens. Thanks

26 Feb 2013, 3:26 AM
#4
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Move 'additional photos' and 'add to cart' button on showbook page

kobra:

Why don't you grab a copy from your other site of the custom template file "tpl_product_info_display.php" and load it into your template on the board site -
don't delete the one that exists just rename it to like "tpl_product_info_display.off"

Wow Kobra, that did it... but I have a problem. I have installed dual pricing 1.8 (it's an older version that isn't really for Zen v1.50, in which I am going to uninstall it, and then re-install the new version of dp,,, but that is for another day.. cuz it is working as is)... and that (dual pricing mod) replaces the includes/templates/my_template/templates/tpl_product_info_display.php file. Soooo,,,, I have a copy of my original tpl_product_info_display.php (before dual pricing install).... what is the best way for me to..
A... find out what DP 1.8 added/changed in my original file, and add that change to this file (from my other site),, or
B... find out what my other site has in it that is making the 'add to cart' and the 'additional photos' show in the positions I want, and add THAT information to the bodyboard file? (to me, that seems like a safer thing to do)..
C... none of the above ..

I know that if I goof up one little ' or < or " ,,, it will not work....

26 Feb 2013, 4:30 AM
#5
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Move 'additional photos' and 'add to cart' button on showbook page

Johnnycopilot:

what is the best way for me to..
A... find out what DP 1.8 added/changed in my original file, and add that change to this file (from my other site),, or
B... find out what my other site has in it that is making the 'add to cart' and the 'additional photos' show in the positions I want, and add THAT information to the bodyboard file? (to me, that seems like a safer thing to do)..
.

I have just compared before DP install file and after DP install and I have come to the conclusion that Option 'A' is out of the question. That being said, it looks like option B may be fairly simple..

Now my questions.. reference below.. Can I just 'move those things around'? and if so, what is that <br class="clearBoth"/> BETWEEN the two (i put in red) in the file that I 'like'? and will I need to add THAT between the add to cart and additional images sections if I move them together?

in my 'other' file (that is set up like I want, from other website),,going from line 67 thru 107 I have this..

<!--bof Add to Cart Box -->

<div class="float-left"> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

?>

<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
        ?>
      </div>
<?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> </div> <!--eof Add to Cart Box--> <br class="clearBoth"/>

<!--bof Additional Product Images -->

<?php /** * display the products additional images */ require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> <!--eof Additional Product Images -->

and in the file that I want to change, on line 111 I see

<!--bof Add to Cart Box -->

<?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

?>

<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
        ?>
      </div>
<?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box-->

Then there is some other code,,, and on line # 180 I see

<!--bof Additional Product Images -->

<?php /** * display the products additional images */ require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> <!--eof Additional Product Images -->
23 Apr 2013, 6:19 AM
#6
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Move 'additional photos' and 'add to cart' button on showbook page

Follow-up for anyone interested. First of all, thanks Kobra, you always give me great advice..Because of Kobra and the other folks here on the forum I am starting to understand a little bit about this. After all of this moving my 'add to cart' button around, I realized something. On products in which I use Attributes, my 'add to cart' button was above the attributes, which was not good,,,, because in some cases, people didn't see the attributes, and checked out without adding needed 'selections'.. and in some cases,,,, maybe not 'needed' selections, but 'additional options' (at additional costs).. So, my conclusion for anyone reading this.. on the Showbook page, keep the 'add to cart' button at the bottom, below attributes.. At least, that's the conclusion that I came to. That's the way that the original template I am using was designed in the first place; however, I do like my 'additional photos' just below the 'main' photo. I think that helps sell an item.