Jump to content
Cyperis

Product Info Page Box

Recommended Posts

@@murena83

Did you make the changes to your /includes/languages/contact_us.php?

Did you make all the file changes listed in the instructions? including the /includes/filenames.php?

Edited by newburns

Share this post


Link to post
Share on other sites

@@newburns

 

Dear newburns i did all the changes in the instruction many times..

 

but there is something that is very strange..

If i try to refresh the product info page the two buttons run without problems.

But when i open for the first time the page it stop to run ...

 

And what change i must do to my /includes/languages/contact_us.php?

i don't have contact_us.php in the folder language ..

 

thx again..

Share this post


Link to post
Share on other sites

@@murena83

Sorry. I didn't give the instructions a once over before I read them.

What's your store URL? What page throws the error?

Share this post


Link to post
Share on other sites

the address is : www.artigianatoorafoitaliano.it

 

try to open a product... you can see that the buttons don't run ... but if you refresh the page there is the possibility that all run well ...

 

P.s.

i have the file contact_us in my language folders...

Share this post


Link to post
Share on other sites

@@murena83

Does line 43 of ask_a_question_popup.php read

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

 

Do you have an addon for your language selection?

Share this post


Link to post
Share on other sites

@@newburns

 

this is my contact_us :

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('HEADING_TITLE', 'Contact Us');

define('NAVBAR_TITLE', 'Contact Us');

define('TEXT_SUCCESS', 'Your enquiry has been successfully sent to the Store Owner.');

define('EMAIL_SUBJECT', 'Enquiry from ' . STORE_NAME);

 

define('ENTRY_NAME', 'Full Name:');

define('ENTRY_EMAIL', 'E-Mail Address:');

define('ENTRY_ENQUIRY', 'Enquiry:');

 

define('ERROR_ACTION_RECORDER', 'Error: An enquiry has already been sent. Please try again in %s minutes.');

?>

 

 

I'm adding two screenshot...

 

In the first the addon run properly, in the second image i have refreshed the page and the button change layout and the addond stop to run...

 

It's possible that jquery is the problem ?? i don't know why 1 times run and other 10 times no ...

 

thx again friend

post-321252-0-77348000-1369768750_thumb.jpg

post-321252-0-15100900-1369768754_thumb.jpg

Share this post


Link to post
Share on other sites

@@murena83

Post your products_info.php

 

Also, are you using a cache system? Have you refreshed the cache folders?

Edited by newburns

Share this post


Link to post
Share on other sites

@@newburns

 

i don't think that i'm using a cache system...

i have header tags seo installed , dynamic template system and shareaholick facebook etc...

 

I have the problem also with the product_info from the contribution...

 

But this is my product_info now:

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

if (!isset($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

 

require(DIR_WS_INCLUDES . 'template_top.php');

 

if ($product_check['total'] < 1) {

?>

<!-- // START Product Info Page Box -->

<script type="text/javascript" src="includes/general.js"></script>

<script type="text/javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=280,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

<!-- // END Product Info Page Box -->

 

<div class="contentContainer">

<div class="contentText">

<?php echo TEXT_PRODUCT_NOT_FOUND; ?>

</div>

 

<div style="float: right;">

<?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?>

</div>

</div>

 

<?php

} else {

/*** Begin Header Tags SEO ***/

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, pd.products_head_sub_text from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

/*** End Header Tags SEO ***/

$product_info = tep_db_fetch_array($product_info_query);

 

$manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");

if (tep_db_num_rows($manufacturer_query)) {

$manufacturer = tep_db_fetch_array($manufacturer_query);

}

 

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

 

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

}

 

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['products_name'] . '<br /><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

?>

 

<div class="contentContainer">

<div class="contentText">

 

<?php

if (tep_not_null($product_info['products_image'])) {

$pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");

 

if (tep_db_num_rows($pi_query) > 0) {

?>

 

<div id="piGal" style="float: right;">

<ul>

 

<?php

$pi_counter = 0;

while ($pi = tep_db_fetch_array($pi_query)) {

$pi_counter++;

 

$pi_entry = ' <li><a href="';

 

if (tep_not_null($pi['htmlcontent'])) {

$pi_entry .= '#piGalimg_' . $pi_counter;

} else {

$pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image']);

}

 

$pi_entry .= '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $pi['image']) . '</a>';

 

if (tep_not_null($pi['htmlcontent'])) {

$pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div></div>';

}

 

$pi_entry .= '</li>';

 

echo $pi_entry;

}

?>

 

</ul>

</div>

 

<script type="text/javascript">

$('#piGal ul').bxGallery({

maxwidth: 300,

maxheight: 200,

thumbwidth: <?php echo (($pi_counter > 1) ? '75' : '0'); ?>,

thumbcontainer: 300,

load_image: 'ext/jquery/bxGallery/spinner.gif'

});

</script>

 

<?php

} else {

?>

 

<div id="piGal" style="float: right;">

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), null, null, 'hspace="5" vspace="5"') . '</a>'; ?>

</div>

 

<?php

}

?>

 

<script type="text/javascript">

$("#piGal a[rel^=fancybox]").fancybox({

cyclic: true

});

</script>

 

<?php

}

?>

 

<!-- // START Product Info Page Box -->

<div class="productinfobox">

<div class="ui-widget infoBoxContainer">

<div class="ui-widget-header infoBoxHeading">

<?php echo $products_name = $product_info['products_name']; ?>

</div>

<div class="ui-widget-content infoBoxContents" style='overflow:hidden;'>

<div style='width: 50%; float: left;'>

<?php

if (PRODUCT_INFO_PAGE_BOX_PRODUCT_MODEL == 'True') {

echo TEXT_MODEL . '<br />';

}

?>

 

<?php echo TEXT_PRICE; ?><br />

<?php if (PRODUCT_INFO_PAGE_BOX_PRODUCT_STOCK == 'True') {

echo TEXT_STOCK_LEVEL . '<br />';

}

?>

<?php

if (PRODUCT_INFO_PAGE_BOX_MANUFACTURER_INFO == 'True') {

echo TEXT_MANUFACTURER . '<br /><br /><br />';

}

?>

</div>

<div style='width: 50%; float: right;'>

<?php

if (PRODUCT_INFO_PAGE_BOX_PRODUCT_MODEL == 'True') {

echo $product_info['products_model'] . '<br />';

}

?>

<?php echo $products_price; ?><br />

<?php if (PRODUCT_INFO_PAGE_BOX_PRODUCT_STOCK == 'True') {

echo tep_get_products_stock($product_info['products_id']) . '<br />';

}

?>

<?php

if (PRODUCT_INFO_PAGE_BOX_MANUFACTURER_INFO == 'True') {

echo $manufacturer['manufacturers_name'] . '<br />';

echo '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer['manufacturers_id']) . '" target="_blank">';

echo TEXT_HOMEPAGE;

echo '</a><br />';

echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">';

echo MODULE_BOXES_MANUFACTURER_INFO_BOX_OTHER_PRODUCTS;

echo '</a><br />';

}

?>

</div>

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

<!-- Attributes Start -->

<?php

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

?>

 

<p><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></p>

 

<p>

<?php

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

$products_options_array = array();

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

while ($products_options = tep_db_fetch_array($products_options_query)) {

$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);

if ($products_options['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

}

 

if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

} else {

$selected_attribute = false;

}

?>

<div style='width: 50%; float: left;'>

<?php echo $products_options_name['products_options_name'] . ':'; ?>

</div>

 

<div style='width: 50%; float: right;'>

<?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?>

</div><br />

<?php

}

?>

</p>

 

<?php

}

?>

<!-- Attributes End -->

<div class="buttonSet">

<span class="buttonActionProductInfoCart">

<?php

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary');

?></form>

</span>

</div><br />

<div class="buttonSet">

<span class="buttonAction">

<div class="buttonSetActionLeft">

<?php

if (PRODUCT_INFO_PAGE_BOX_QUESTION_BUTTON == 'True') {

echo '<a href="' . tep_href_link(FILENAME_ASK_A_QUESTION_POPUP) . '" target="_blank" onclick="$(\'#askaquestion\').dialog(\'open\'); return false;">';

echo tep_draw_button(TEXT_ASK_A_QUESTION_POPUP, 'help');

echo '</a>';

}

?>

</div>

</span>

<div class="buttonSetActionLeft">

<?php

if (PRODUCT_INFO_PAGE_BOX_REVIEW_BUTTON == 'True') {

echo '<a href="' . tep_href_link(FILENAME_REVIEWS_POPUP) . '" target="_blank" onclick="$(\'#reviews\').dialog(\'open\'); return false;">';

echo tep_draw_button(TEXT_REVIEWS_POPUP, 'comment');

echo '</a>';

}

?>

</div>

<div align="center">

<?php

if (PRODUCT_INFO_PAGE_BOX_TELL_BUTTON == 'True') {

echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&products_id=' . (int)$HTTP_GET_VARS['products_id']), 'post', '', true);

echo '<a href="' . tep_href_link(FILENAME_TELL_A_FRIEND_POPUP) . '" target="_blank" onclick="$(\'#tellafriend\').dialog(\'open\'); return false;">';

echo tep_draw_button(TEXT_TELL_A_FRIEND_POPUP, 'mail-closed');

echo '</a>';

}

?>

</div>

</div>

</div>

</div>

</div>

<?php echo stripslashes($product_info['products_description']); ?>

 

<div id="reviews" title="<?php

echo 'Reviews for ';

echo tep_get_products_name($product_info['products_id']); ?>">

<?php include(FILENAME_REVIEWS_POPUP); ?>

</div></form>

<div id="tellafriend" title="<?php

echo 'Tell a Friend About ';

echo tep_get_products_name($product_info['products_id']); ?>">

<?php include(FILENAME_TELL_A_FRIEND_POPUP); ?>

</div></form>

<div id="askaquestion" title="<?php

echo 'As Us a Question About ';

echo tep_get_products_name($product_info['products_id']); ?>">

<?php include(FILENAME_ASK_A_QUESTION_POPUP); ?>

</div></form>

 

<script type="text/javascript">

$('#reviews').dialog({

autoOpen: false,

width: 700,

buttons: {

'Close Dialog Box': function() {

$(this).dialog('close');

}

}

});

</script>

<script type="text/javascript">

$('#tellafriend').dialog({

autoOpen: false,

width: 400,

buttons: {

'Close Dialog Box': function() {

$(this).dialog('close');

}

}

});

</script>

<script type="text/javascript">

$('#askaquestion').dialog({

autoOpen: false,

width: 500,

buttons: {

'Close Dialog Box': function() {

$(this).dialog('close');

}

}

});

</script>

<!-- END Scripts for Popups -->

 

 

 

</div>

 

<?php

$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");

$reviews = tep_db_fetch_array($reviews_query);

?>

 

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

?>

<?php /*** Begin Header Tags SEO ***/

if (tep_not_null($product_info['products_head_sub_text'])) {

echo '<tr><td><table border="0" cellpadding="0"><tr><td class="hts_sub_text"><div>' . $product_info['products_head_sub_text'] . '</div></td></tr></table></td></tr>';

}

 

if (HEADER_TAGS_DISPLAY_CURRENTLY_VIEWING == 'true') {

echo '<div style="margin-top:5px;"><div style="text-align:center" class="smallText">' .TEXT_VIEWING . ' ';

if (! tep_not_null($header_tags_array['title'])) $header_tags_array['title'] = $product_info['products_name'];

echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . '</a>';

echo '</div></div>';

}

/*** End Header Tags SEO ***/

?>

<?php // box_social_bookmarks

if (($oscTemplate->hasBlocks('box_social_bookmarks'))) {

echo $oscTemplate->getBlocks('box_social_bookmarks');

}

?>

 

</div>

 

</form>

 

<?php

}

 

require(DIR_WS_INCLUDES . 'template_bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Share this post


Link to post
Share on other sites

@@newburns

 

i have disabled shareaholics social bookmarks now and i have solved the problem with the button that not load properly in my product page etc..

 

In google chrome the button runs all perfectly except ask a question that don't send the message...you know why ?

 

In internet explorer i have many problem with layout ... :(

 

I attached 2 screenshot...

 

screen 1 is with google chrome and the layout is perfect...

 

screen 2 is with internet explorer and the modules are opened in the product info...

post-321252-0-22233000-1369772263_thumb.jpg

post-321252-0-92677100-1369772264_thumb.jpg

Share this post


Link to post
Share on other sites

@@murena83

Do you have a backup of product_info.php before product info box install?

 

Also, what is wrong with your Ask a Question popup?

Share this post


Link to post
Share on other sites

@@newburns

 

asq question run now good...but sometimes when i press continue after that i have writed the message it return to me error action recorder and after i press continue and appear the page : The requested URL /FILENAME_ASK_A_QUESTION was not found on this server.

 

But the very problems are with internet explorer... the button don't run because all the box are strecthed in the product_info...

i have also a backup of my page product info if you need...

 

you are really a best man.. You are helping me and i'm taking many of your time...

If you need something in future and i can help you i'm very happy..

 

P.s. try to send many times an asq question and you can see the error action recorder...

 

Share this post


Link to post
Share on other sites

@@newburns

 

Dear newburns,

i solved all the problems with google chrome.. i need only to solve the problem of layout with internet explorer...

 

In my page with internet explorer i can read this message from the browser...:

 

 

Messaggio: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

Linea: 0

Carattere: 0

Codice: 0

URI: http://www.artigianatoorafoitaliano.it/product_info.php?cPath=17&products_id=29

 

do you know how i can solve this problem ?....

i'm really near the end of my problems.. i must only set this problem with internet explorer..

 

thanks again friend.

 

daniele

Share this post


Link to post
Share on other sites

I have sorted the layout, sorry to ask stupid question.

How did you cure your layout issue? Here is what I am facing.

post-59191-0-99979400-1387329685_thumb.jpg

Share this post


Link to post
Share on other sites

Does anyone have a copy of the catalog/product_info.php file with this contribution as well as the tabs contribution by echoguns successfully added in so that I might see how it is supposed to layout. My layout is all messed up when I put this contribution in place with the tabs contribution I have already installed. This is the only file which I cannot get right from this contribution.

Edited by L. Haase

Share this post


Link to post
Share on other sites

Heyho,

 

i can't do the edit from #6:

admin/includes/column_left.php

include(DIR_WS_BOXES . 'tools.php');

 

Because there's nothing similar in the column_left.php.

In the adminpanel I get an 404 Error, if I click on "Product Info Box" (without the #6. edit)

 

Any solutions?

 

 

 

Much thanks!

osC V2.3.3.4

 

 

Edit:

Okay, overwrited the "Modified Files", now it works. But I think not perfekt (other paneldesign) with actual osC!?

Edited by Jobsti

Share this post


Link to post
Share on other sites

Hello I wish. By the way, I've updated my appearance. But I came across two problems.

1) in column_left.php can not be included include (DIR_WS_BOXES. 'Tools.php'); I do not know where to include include (DIR_WS_BOXES 'echo_customizations.php');

2) After all the changes, my administration ceased to work. Either it returns me to index.php in admin, or it sends me to the error page of my hosting.

In admin / includes / filenames.php I have done everything in the tutorial as well as in include / filenames.php, some of it redirects me without a problem and some vice versa. In the link I have / FILENAME_CUSTOMERS and others, these sections link to an error page.

Do not you know what this may be? Thank you for the answers and the advice

I have installed osCommerce v.2.3.4 Full Package

Finally, I would have one more general question as to how to make a purchase without having to register. Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×