Alexandero Posted March 22, 2007 Posted March 22, 2007 hello everybody here, I wonder if someone could tell me how how to add a gif or any image below the shopping cart form..? in the shopping_cart.php ? exaclty under the buttons (UPDATE CART - CONTINUE SHOPPING - CHECKOUT) There is some space there I want to add an advertisement so that the clients buy more :) Thank you :)
jasonabc Posted March 23, 2007 Posted March 23, 2007 Open shopping_cart.php and add another table row/cells under this. Then add whatever image you need to the cell(s): <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td> <?php $back = sizeof($navigation->path)-2; if (isset($navigation->path[$back])) { ?> <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td> <?php } ?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Alexandero Posted March 23, 2007 Author Posted March 23, 2007 Thank you Jason for your kind rely, but i have multilingual store, If i add the image in catalog/shoppingcart.php .. the same image will appear in all languages.. What I want to do is for each language I will add a different image.. So I think that the addition should be made in .../..../languages/ *any language*/ some file .. err I don't know which one ... Any other suggestion please
Alexandero Posted March 23, 2007 Author Posted March 23, 2007 Thank you Jason for your kind rely, but i have multilingual store, If i add the image in catalog/shoppingcart.php .. the same image will appear in all languages.. What I want to do is for each language I will add a different image.. So I think that the addition should be made in .../..../languages/ *any language*/ some file .. err I don't know which one ... I think it would be better to place that gif above WHAT'S In MY CART text... can I ? Any other suggestion please
carthrina Posted March 23, 2007 Posted March 23, 2007 Maybe the modification should take place somewhere in languages/language/index.php Not sure.. :(
jonquil Posted March 23, 2007 Posted March 23, 2007 I suppose you could replicate the behaviour of the update / continue shopping / checkout buttons by creating an image appropriate for the user-selected language. This would be done, as Jack suggests, in catalog/shopping cart.php. Your goal is to have the image switch with the language and my suggestion would accomplish this. In this tested example, I am using "advert" to name the image. Create your adverts images in your languages of choice. Give them the same file name: "button_advert.gif" (or jpg) In includes/languages/english.php, add this line (around 249) in alpha order: define('IMAGE_BUTTON_ADVERT', 'Advert'); In includes/languages/espanol.php, add this line (around 249) in alpha order:below: define('IMAGE_BUTTON_ADVERT', 'Advert'); Upload your English-version image to includes/languages/english/images/buttons/ Upload your Spanish-version image to includes/languages/espanol/images/buttons/ Insert the red code below in the catalog/shopping_cart.php: <?php $back = sizeof($navigation->path)-2; if (isset($navigation->path[$back])) { ?> <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td> <?php } ?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> [color="#FF0000"]<tr><td align="center"><p><?php echo tep_image_button('button_advert.gif', IMAGE_BUTTON_ADVERT); ?></td></tr> [/color] </table></td> </tr> </table></td> </tr> <?php } else { ?> <tr> <td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> [color="#FF0000"]<tr><td align="center"><p><?php echo tep_image_button('button_advert.gif', IMAGE_BUTTON_ADVERT); ?></td></tr> [/color] </table></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> jon It's all just ones and zeros....
carthrina Posted March 23, 2007 Posted March 23, 2007 thank you.. i am afraid it did not work :( there is no change at all
Alexandero Posted March 23, 2007 Author Posted March 23, 2007 Oh Jon many thanks to you your idea was great Best regards,
Recommended Posts
Archived
This topic is now archived and is closed to further replies.