PDA

View Full Version : Can you help me move something?



wheel
Mar 29th, 2010, 09:31 PM
Can someone tell me how to move the social bookmarks to right above add to cart bar and have it centered. I zipped up the file with the code in it.

http://www.ecustomwheels.com/images/pic.bmp

mbaker
Mar 30th, 2010, 02:10 AM
One: Without also being able to look at the generated HTML it is difficult to say what needs to be done. It is much easier to make a copy of the generated HTML, alter it to display the way you want, then modify the PHP so that it produces the same HTML as your modified version.

Two: Your page is using tables for layout. This is a practice that was abandoned 10 years ago with the advent of CSS.

wheel
Mar 30th, 2010, 04:06 AM
one: the code is in the zip file
two: thanks for telling me something that I already know.

Thanks for any help you can give. :thumbsup:

mbaker
Mar 30th, 2010, 10:45 AM
Wheel,

The only code I found in the zip file was the product_info.php file.

While there are undoubtedly people capable of reading a php file and creating the resultant rendered html output in their mind's eye, then figuring out what needs fixing in the html, and then working back to what needs fixing in the php, all in one step, that is not me.

The way that I tackle issues like this, is to look at the rendered html - using a browser's view source - then work out how to fix the html. Once I know what needs fixing in the html, I can figure out what needs fixing in the php.

But without seeing the rendered html, I'm unable to help. I suspect there are others who would also work in a similar way, and would be able to assist you if they could see the rendered html.

Michael.

wheel
Mar 30th, 2010, 02:10 PM
Here you go. Thanks for any help you can give.

mbaker
Mar 30th, 2010, 05:01 PM
In beloved-p-20[1] on line 318 if you change text-align:center; to text-align:right; you will move the social bookmarks to the right. That is change line 318 from:

<div style="font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif;text-align:center;">
to:

<div style="font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif;text-align:right;">

On a first search I am unable to find this in the original php file.

I'll search a bit more. If I find it I will post again.

mbaker
Mar 30th, 2010, 05:17 PM
In beloved-p-20[1] on line 318 if you change text-align:center; to text-align:right; you will move the social bookmarks to the right.
....
On a first search I am unable to find this in the original php file.

I'll search a bit more. If I find it I will post again.

The reason I could not find it is that it is not in product_info.php.

Here are the relevant lines (291-298) of product_info.php:


<!-- social bookmarks start //-->
<?php

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

?>

<!-- social bookmarks finish //-->

If you can't get access to modify DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS you could get nearly the same effect by changing lines 291-298 to:


<!-- social bookmarks start //-->
<div style="float:right"><?php

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

?></div>

<!-- social bookmarks finish //-->

wheel
Mar 30th, 2010, 06:43 PM
Sorry I didnt explain my self right. If you look at this picture I want it right where the arrow is pointing. If possible. Thanks for your help. :thumbsup:

http://www.ecustomwheels.com/images/pic.bmp

mbaker
Apr 1st, 2010, 05:47 PM
Oh, I see.

Your social bookmarking code is currently located below the Reviews / Add to Cart buttons, but, to coin a term, it is "loose inside the table" (ie outside of any <tr>) and has, to coin another term, "floated" to the top of the table.

What you need to do is place it in <tr><td></td></tr> and move it up the php file about 17 lines. You may also want to replicate one of the separator lines in the table. That is replace:
<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 '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<!-- social bookmarks start //-->
<?php

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

?>

<!-- social bookmarks finish //-->With:
<!-- social bookmarks start //-->
<?php

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

?>
<!-- social bookmarks finish //-->
<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 class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>