Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Info Page Box


Cyperis

Recommended Posts

Is it possible for the product info box's Version/Option selection to default to "Select your option below", and not to one of the options?

http://mtrosemedia.tk/store

 

in product_info.php find

 

$products_options_array = array();

 

and below it add

 

$products_options_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);

 

and then in includes/languages/english.php add

 

define('PULL_DOWN_DEFAULT', 'Please Select');

 

Mark

Link to comment
Share on other sites

  • 2 weeks later...

hi,

i love this addon and i trie since two days to fit it in my product_info without a satisfactory result :(

The problem is our german law wich makes it necessary to fit in the tax_info and baseprice.

But these two damn addons bring PageBox completely mixed up.

Without the baseprice it works pretty fine but soon as i have a product with baseprice, PageBox will mixed up.

 

here is what the price with baseprice looks like without PageBox:

 

1,190.00€

inkl. 19% MwSt. zzgl. Versand

Grundpreis: 1,785.00 € | inkl. 19% MwSt.

 

The main problem is that the baseprice is not on all products active.

The manufacture on the left side will not match the manufacturer name on the right side - its not always in the same row.

Maybe I can have someone help with the integration of PageBox in the product_info?

 

sorry for my bad english :blush:

 

 

sytem is: osc2.3.1 / PHP 5.3.10 (Zend: 2.3.0) / MySQL 5.5.28

 

here is my product_info: (without PageBox)

 

<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
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) {
?>
<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 {
// osc-support-edition BOF
$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_baseprice, p.products_baseprice_unit, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id 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 . "'");
// osc-support-edition EOF
$product_info = tep_db_fetch_array($product_info_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'])) {
// osc-support-edition BOF
 $products_price = '<del>' . $currencies->display_price_normal($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>';
// osc-support-edition EOF	
} 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'];
}
?>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<?php
// osc-support-edition BOF
$baseprice = '';
$baseprice_unit = '';
if($product_info['products_baseprice'] > 0){
 $baseprice = TEXT_BASEPRICE . $currencies->display_price_normal($product_info['products_baseprice'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ' | ' . $product_info['products_baseprice_unit'];
}
?>
<div>
<h1 style="float: right;"><?php echo $products_price; ?><div style="font-size:10px; margin-top:5px;"><?php echo $baseprice; ?></div></h1>
<h1><?php echo $products_name; ?></h1>
</div>
<br style="clear:both;"/>
<?php
// osc-support-edition EOF
?>
<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
}
?>
<?php echo stripslashes($product_info['products_description']); ?>
<?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><?php echo TEXT_PRODUCT_OPTIONS; ?></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') {
//osc-support-edition BOF		
	 $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . strip_tags($currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id']))) .') ';
//osc-support-edition EOF		
}
 }
 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;
 }
?>
 <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br />
<?php
 }
?>
</p>
<?php
}
?>
<div style="clear: both;"></div>
<?php
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<p style="text-align: center;"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></p>
<?php
}
?>
</div>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and reviews_status = 1");
$reviews = tep_db_fetch_array($reviews_query);
?>
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
<?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>
</div>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
 echo tep_cache_also_purchased(3600);
} else {
 include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
?>
</div>
</form>
<?php
}
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

Edited by stratula
Link to comment
Share on other sites

@@stratula

If a row isn't lining up correctly with its corresponding name its because the value of it is making it appear on more than one line and therefore throwing it off. Currently it is coded as two boxes, all the names on the left in one box, and the values on the right in another. Ive since modified mine, please note that there are a lot of things in here that wont match up with what you have but Im giving you this as a baseline so that you can modify it to suit your needs:

 <div class="ui-widget-content infoBoxContents" style='overflow:hidden; padding:5px'>
	  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
	   <div style='width: 50%; float: left; line-height: 1'>
			 <?php echo '<font size="+1">MSRP:</font>'; ?><br />
	   <?php echo '<font size="+2">' . TEXT_PRICE . '</font>'; ?><br />
			    <?php echo '<font size="+1">You Save:</font>'; ?>
	  </div>
	  <div style='width: 50%; float: right; line-height: 1'>
	   <?php
  $product_savings_over_msrp = $product_info['products_msrp'] - $product_info['products_price'];
  $product_savings_over_msrp_percernt = number_format($product_savings_over_msrp / $product_info['products_msrp'] * '100');
  echo '<font color="#FF0000" size="+1"><del>' . $products_msrp . '</del></font><br />';
  echo '<span itemprop="price"><font color="green" size="+2"><strong>' . $products_price . '</strong></font></span><br />';
  echo '<font color="#FF0000" size="+1">' . $products_msrp_savings . '(';
  echo $product_savings_over_msrp_percernt;
  echo '%)' . '</font>';
 ?>
	  </div>
	 </div>
	 <div>
	  <div style='width: 50%; float: left;'>
 <?php
  if (PRODUCT_INFO_PAGE_BOX_PRODUCT_MODEL == 'True') {
   echo TEXT_MODEL;
  }
 ?>
	  </div>
	  <div style='width: 50%; float: right;'>
			 <?php
  if (PRODUCT_INFO_PAGE_BOX_PRODUCT_MODEL == 'True') {
   echo '[' . $product_info['products_model'] . ']';
  }
 ?>
	  </div>
	 </div>
			 <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td>
	 <div>
	  <div style='width: 50%; float: left;'>
			 <?php if (PRODUCT_INFO_PAGE_BOX_PRODUCT_STOCK == 'True') {
  echo TEXT_STOCK_LEVEL;
   $productstocklevel = tep_get_products_stock($product_info['products_id']);
   if ($productstocklevel <= '0') {
    $productstocklevelrnd = '';
   }
   if ($productstocklevel > '0') {
    $productstocklevelrnd = '<font color=green>We have</font> ' . $productstocklevel;
   }
  }
 ?>
	  </div>
	  <div style='width: 50%; float: right;'>
			 <?php if (PRODUCT_INFO_PAGE_BOX_PRODUCT_STOCK == 'True') {
   if ($productstocklevel >= '1') {
    $productstocklevelmsg =  '<font color=green>In Stock!</font>';
   }
   if ($productstocklevel <= '0') {
    $productstocklevelmsgno = '<font color=red>Currently out of stock</font><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_draw_button('Notify Me When In Stock', 'notice') . '</a>';
   }
   echo ' <strong>' . $productstocklevelrnd . ' ' .$productstocklevelmsg . $productstocklevelmsgno . '</strong>';
  }
 ?>
	  </div>
	 </div>
		    </td></tr></table>
	 <div>
	  <div style='width: 50%; float: left;'>
			 <?php
  if (PRODUCT_INFO_PAGE_BOX_MANUFACTURER_INFO == 'True') {
   echo TEXT_MANUFACTURER . '<br /><br />';
  }
 ?>
	  </div>
	  <div style='width: 50%; float: right;'>
			 <?php
  if (PRODUCT_INFO_PAGE_BOX_MANUFACTURER_INFO == 'True') {
   echo $manufacturer['manufacturers_name'] . '<br />';
   echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">';
   echo '<em>' . MODULE_BOXES_MANUFACTURER_INFO_BOX_OTHER_PRODUCTS . '</em>';
   echo '</a><br />';
  }
 ?>
	  </div>
	 </div>
 </div>

Link to comment
Share on other sites

..sorry there is still one point what gets me.

Do you know how i can make the three button in the bottom line of the PageBox a little bit smaller?

because of our long german language they are not in line. The one in the middle (tell_a_friend) is in a row below the others.

Link to comment
Share on other sites

in product_info.php find

 

$products_options_array = array();

 

and below it add

 

$products_options_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);

 

and then in includes/languages/english.php add

 

define('PULL_DOWN_DEFAULT', 'Please Select');

 

Mark

 

How do you display an error message and stop it from going to the empty cart when you don't select any option, and, with "Default" selected, you add to cart.

 

When I hit add to cart, without making a selection, it sends me to the empty cart. I want it to display some sort of error if there is no selection made

 

POSSIBLE???

Link to comment
Share on other sites

  • 1 month later...

@@peterguk

I had the same issue because there wasn't a value in the "attributes" or selection box. I don't see your selection box, but at my store, if you select A product without selecting the option, it does the same thing. Ideally, my store should not allow this, being I reconfigured every product to utilize multiple attributes so there is a reason for the selection. But I do believe you need to enable the selection for attributes.

 

Example:

http://mtrosemedia.tk/store/

Add a product with and without selecting an attribute. See the difference. I have changed some of my wording for the english language to help navigate the cart when attributes aren't selected, but essentially, it is the same thing that's happening to you.

Link to comment
Share on other sites

@@newburns

 

Thank you for your reply.

 

OK, i've had a play. At my site, no item will add to basket, regardless of whether there are attributes.

 

At your site, any item will add to basket, including those without attributrs. E.g.:

 

http://mtrosemedia.tk/store/product_info.php/the-answer-prayer-p-90?

 

I tried for 2 hours last night, but can see nothing wrong with the code in the add on product_info page.

 

Can you paste up or message me your product_info.php page so i can compare?

 

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

http://oxytarm-ap.com/shop/catalog/product_info.php?products_id=30

 

Look at my buttons, so out of place. can Echo or newburns send me your product_info.php so that I can compare and configure.

 

Basically, what i need is to configure these boxes and buttons properly so that it doesnt cover my picture. even the heading "black bar" is too extending and into my product picture!

 

Please help! thanks thanks

Link to comment
Share on other sites

http://oxytarm-ap.com/shop/catalog/product_info.php?products_id=30

 

Look at my buttons, so out of place. can Echo or newburns send me your product_info.php so that I can compare and configure.

 

Basically, what i need is to configure these boxes and buttons properly so that it doesnt cover my picture. even the heading "black bar" is too extending and into my product picture!

 

Please help! thanks thanks

 

I have minimal programming background

 

I manage to adjust it.Solution i did is

 

/* START Product Info Page Box */

.productinfobox {

width: 40%;

 

For the "stylesheet.css" i keep changing the percentage.

Link to comment
Share on other sites

Hi, my website is www.oxytarm-ap.com OScommerce 2.3.1

 

My next question, is

 

http://www.echo-guns.com/product_info.php/echo-guns/lower-receiver/stripped-lower-receiver/0001-p-664

 

How do i get something like echo-guns?

 

I am interested in getting 4 more lines (essentially 2 features like the link above)

 

Eg.

 

1)

Quantity desired drop down menu at the add to cart area.

 

2)

MSRP:

 

Price:

You Save:

$199.95

$199.95

$0.00(0%)

Link to comment
Share on other sites

  • 2 weeks later...

@@peterguk

Have you made any changes to shopping_cart.php?

 

@@Comesticage

I Copied this from the source code on his page. What is really interesting to me is that he has a special message displayed at the bottom of the infobox based on who the manufacturer is. Nice. http://www.echo-guns.com/product_info.php/spikes-tactical/replacement-parts/charging-handle-gunfighter-medium-latch/suh10g4-p-516

 

I would say compare it to your own, and see what the differences are. Make a backup of your own, and try to implement some of the differences to see if they work.

 

<!-- // START Product Info Page Box -->
<div class="productinfobox">
<div class="ui-widget infoBoxContainer">
 <div class="ui-widget-header infoBoxHeading">
  <span itemprop="name">Charging Handle - BCM Gunfighter w/ Mod 4 Medium Latch</span>
    </div>
 <div class="ui-widget-content infoBoxContents" style='overflow:hidden; padding:5px'>

	  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
	   <div style='width: 50%; float: left; line-height: 1'>
			 <font size="+1">MSRP:</font><br />
	   <font size="+2">Price:</font><br />
			    <font size="+1">You Save:</font>		  </div>
	  <div style='width: 50%; float: right; line-height: 1'>
	   <font color="#FF0000" size="+1"><del>$0.00</del></font><br /><span itemprop="price"><font color="green" size="+2"><strong>$43.95</strong></font></span><br /><font color="#FF0000" size="+1">$-43.95(0%)</font>		  </div>
	 </div>
	 <div>
	  <div style='width: 50%; float: left;'>
 Model:		  </div>
	  <div style='width: 50%; float: right;'>
			 [sUH10G4]		  </div>
	 </div>
			 <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td>
	 <div>
	  <div style='width: 50%; float: left;'>
			 Stock Level:		  </div>
	  <div style='width: 50%; float: right;'>
			  <strong><font color=green>We have</font> 2 <font color=green>In Stock!</font></strong>		  </div>
	 </div>
		    </td></tr></table>
	 <div>
	  <div style='width: 50%; float: left;'>
			 Manufacturer:<br /><br />		  </div>
	  <div style='width: 50%; float: right;'>
			 Spikes Tactical<br /><a href="http://www.echo-guns.com/index.php/spikes-tactical-m-16"><em>Other products</em></a><br />		  </div>
	 </div>
 </div>
    <div class="ui-widget-content infoBoxContents" style='overflow:hidden; padding:5px'>
  <form name="cart_quantity" action="http://www.echo-guns.com/product_info.php/spikes-tactical/replacement-parts/charging-handle-gunfighter-medium-latch/suh10g4-p-516?action=add_product" method="post"><!-- Attributes Start -->


<!-- Attributes End -->
	    <div class="buttonSet">
		 <span class="buttonActionProductInfoCart">Quantity Desired
 <input type="hidden" name="products_id" value="516" /><input type="text" name="add_quantity" value="1" size="4" /><span class="tdbLink"><button id="tdb2" type="submit">Add to Cart</button></span><script type="text/javascript">$("#tdb2").button({icons:{primary:"ui-icon-cart"}}).addClass("ui-priority-primary").parent().removeClass("tdbLink");</script></form>
	  </span>
	    </div>
	    <div class="buttonSet">
		 <span class="buttonAction">
		  <div class="buttonSetActionLeft">
				 <a href="http://www.echo-guns.com/ask_a_question_popup.php" target="_blank" onclick="$('#askaquestion').dialog('open'); return false;"><span class="tdbLink"><button id="tdb3" type="submit">Ask a Question</button></span><script type="text/javascript">$("#tdb3").button({icons:{primary:"ui-icon-help"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script></a>			 </div>
		    </span>
	    <div class="buttonSetActionLeft">
<a href="http://www.echo-guns.com/product_reviews_popup.php" target="_blank" onclick="$('#reviews').dialog('open'); return false;"><span class="tdbLink"><button id="tdb4" type="submit">Reviews</button></span><script type="text/javascript">$("#tdb4").button({icons:{primary:"ui-icon-comment"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script></a>
   </div>
		 <div align="center">
<form name="email_friend" action="http://www.echo-guns.com/tell_a_friend.php?action=process&products_id=516" method="post"><input type="hidden" name="formid" value="ddae2a01be4c7513a05dcfde98ebc7e8" /><a href="http://www.echo-guns.com/tell_a_friend_popup.php" target="_blank" onclick="$('#tellafriend').dialog('open'); return false;"><span class="tdbLink"><button id="tdb5" type="submit">Tell a Friend</button></span><script type="text/javascript">$("#tdb5").button({icons:{primary:"ui-icon-mail-closed"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script></a>		  </div>
  </div>
<table>
<tr>
<td class="main">For more information, please visit this products <a href="http://www.echo-guns.com/redirect.php?action=url&goto=http%3A%2F%2Fwww.spikestactical.com%2Fnew%2Fz%2Fcharging-handle-bcm-gunfighter-w-mod-4-medium-latch-p-419.html" target="_blank"><u>webpage</u></a>.</td>
</tr>
<tr>
<td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td>
</tr>
<tr>
<td class="main"><p>
Spikes Tactical is experiencing severe backorders. Please see <strong><a href="http://www.spikestactical.com/ourcustomers2.jpg"><span style="color:#ff0000;">this link</span></a></strong> for more information. Please use the 'Ask a Question' button above to see if the current item is in stock before ordering.</p></td>
</tr>
</table>
 </div>
</div>
</div><!-- Product Info Box -->
<br />

Link to comment
Share on other sites

@@newburns

 

Thanks. Let me try. hope that it is just a single change to the products_info.php file then can control in admin space.

 

Btw, the manufacturer website can be inserted using the original product info box add on by echo. u can turn it on or off in the admin panel.

Link to comment
Share on other sites

@@newburns and @@echo

 

I added the changes to product_info.php.

 

Got the below - but all the products have the same price and savings - so is pretty much useless. i believe what echo did is that the add on was a "admin-based" one. ie. he can easily altered the MSRP, Price and You save for all products individually in the OScommerce admin panel.

 

I also manage to added successfully the Qty desired drop down menu but no matter what qty i enter to the box, it does not make any difference to the qty in the cart. i can input 100 but when i press add to cart, only 1 piece can added.

 

 

MSRP:

Price:

You Save:

$40.50

$39.95

$0.55(1%)

Link to comment
Share on other sites

@@Comesticage@@newburns

 

Been a while since I've had to do any edits to my files so I'm a bit rusty :P

 

Firstly, its a lot more involved than just changing formatting on the product_info.php page. Here is an excerpt from the part that displays what yal are talking about:

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

         <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
         	      <div style='width: 50%; float: left; line-height: 1'>
		        <?php echo '<font size="+1">MSRP:</font>'; ?><br />
  	             <?php echo '<font size="+2">' . TEXT_PRICE . '</font>'; ?><br />
			    <?php echo '<font size="+1">You Save:</font>'; ?>
               </div>
  	         <div style='width: 50%; float: right; line-height: 1'>
  	             <?php
                       $product_savings_over_msrp = $product_info['products_msrp'] - $product_info['products_price'];
                       $product_savings_over_msrp_percernt = number_format($product_savings_over_msrp / $product_info['products_msrp'] * '100');
                       echo '<font color="#FF0000" size="+1"><del>' . $products_msrp . '</del></font><br />';
                       echo '<span itemprop="price"><font color="green" size="+2"><strong>' . $products_price . '</strong></font></span><br />';
                       echo '<font color="#FF0000" size="+1">' . $products_msrp_savings . '(';
                       echo $product_savings_over_msrp_percernt;
                       echo '%)' . '</font>';
                   ?>
  	         </div>
  		 </div>
  		 <div>
  	         <div style='width: 50%; float: left;'>
                   <?php
                       if (PRODUCT_INFO_PAGE_BOX_PRODUCT_MODEL == 'True') {
                           echo TEXT_MODEL;
                       }
                   ?>
  	         </div>
               <div style='width: 50%; float: right;'>
  				 <?php
                       if (PRODUCT_INFO_PAGE_BOX_PRODUCT_MODEL == 'True') {
                           echo '[' . $product_info['products_model'] . ']';
                       }
                   ?>
  	         </div>
  		 </div>
  				 <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td>
  		 <div>
  	         <div style='width: 50%; float: left;'>
  				 <?php if (PRODUCT_INFO_PAGE_BOX_PRODUCT_STOCK == 'True') {
                       echo TEXT_STOCK_LEVEL;

                           $productstocklevel = tep_get_products_stock($product_info['products_id']);
                           if ($productstocklevel <= '0') {
                               $productstocklevelrnd = '';
                           }
                           if ($productstocklevel > '0') {
                               $productstocklevelrnd = '<font color=green>We have</font> ' . $productstocklevel;
                           }
//                            if ($productstocklevel <= '0') {
//                                echo '<br /><br />';
//                            }
                       }
                   ?>
  	         </div>
  	         <div style='width: 50%; float: right;'>
  				 <?php if (PRODUCT_INFO_PAGE_BOX_PRODUCT_STOCK == 'True') {
                           if ($productstocklevel >= '1') {
                               $productstocklevelmsg =  '<font color=green>In Stock!</font>';
                           }
                           if ($productstocklevel <= '0') {
                               //$productstocklevelmsgno =  '<font color=red>Currently out of stock</font><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '"></strong><b><i><u>Click here to notify me when item is back in stock.</u></i></b><strong></a>';
                                               $productstocklevelmsgno = '<font color=red>Currently out of stock</font><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_draw_button('Notify Me When In Stock', 'notice') . '</a>';



                           }
                           echo ' <strong>' . $productstocklevelrnd . ' ' .$productstocklevelmsg . $productstocklevelmsgno . '</strong>';
                       }

                   ?>
  	         </div>
  		 </div>
		    </td></tr></table>
  		 <div>
  	         <div style='width: 50%; float: left;'>
  				 <?php
                       if (PRODUCT_INFO_PAGE_BOX_MANUFACTURER_INFO == 'True') {
                           echo TEXT_MANUFACTURER . '<br /><br />';
                       }
                   ?>
  	         </div>
  	         <div style='width: 50%; float: right;'>
  				 <?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"><em>';
//                            echo TEXT_HOMEPAGE;
//                            echo '</em></a><br />';
                           echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">';
                           echo '<em>' . MODULE_BOXES_MANUFACTURER_INFO_BOX_OTHER_PRODUCTS . '</em>';
                           echo '</a><br />';
                       }
                   ?>
  	         </div>
  		 </div>
       </div>

I've added a lot of stuff to the admin/categories.php so that when Im adding products and setting prices, it automatically sets the savings over MSRP, the percentrage, all that stuff. So that on the product_info.php just calls the necessary variables.

 

I've also got QTPro installed, the multiple quantity addon, a lot of custom code..... I'm not available here all the time to help out but for DIY'ers this should be a start.

Link to comment
Share on other sites

  • 2 weeks later...

@@EchoGuns and @@newburns

 

With reference to the product tabs addon too,

 

Another interesting feature that I will like to share is to try to add

 

http://addons.oscommerce.com/info/8470/v,23

 

into a new tab..

 

This way, the reviews can be easily read in a tab rather than clicking the reviews button on the product info box.

 

Challenging. - i still can't do it. been trying for hours.

Edited by Comesticage
Link to comment
Share on other sites

@@Comesticage

It looks to already be built into the original code.

/includes/modules/product_tabs.php shows that it will display the reviews or tell a friend or Ask a Question if the option is set to true.

However, there is no option.

I will look into how to get the option available.

I believe it has to be a MySQL option that gives the value of True or False to "PRODUCT_TABS_REVIEWS_TAB"

I'm not really sure. I'm still learning PHP through the W3School tutorials. :D

Edited by newburns
Link to comment
Share on other sites

@@Comesticage

I'm guessing you can always set it manually.

 

define('PRODUCT_TABS_REVIEWS_TAB','True');

 

But I haven't learned how to create options within the admin menu.

I haven't made it that far in @@burt book. Between the book and W3School, I've learned I don't know that much

Link to comment
Share on other sites

I'm not making the connection from /admin/includes/product_tabs.php to /includes/modules/product_tabs.php.

It doesn't appear that /admin/includes/product_tabs.php does not set any MySQL values.

How does it Save the value of "products_tab_x" or what would be PRODUCT_TABS_REVIEWS_TAB?

Basically, I was just going to copy a previous line to make a new option, but ...

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

i would know if anyone know how to resolve the problems when i click in buttons review tell a friend and ask a question.

 

The problem that appaers is :

 

Fatal error: Call to undefined function tep_db_query() in /web/htdocs/www.xxxxxxxxx.it/home/product_reviews_popup.php on line 20

 

Warning: require(DIR_WS_LANGUAGES/FILENAME_CONTACT_US): failed to open stream: No such file or directory in /web/htdocs/www.xxxxxxxxxxxxx.it/home/ask_a_question_popup.php on line 43 Warning: require(DIR_WS_LANGUAGES/FILENAME_CONTACT_US): failed to open stream: No such file or directory in /web/htdocs/www.xxxxxxxxxxxxxxxxx.it/home/ask_a_question_popup.php on line 43 Fatal error: require(): Failed opening required 'DIR_WS_LANGUAGES/FILENAME_CONTACT_US' (include_path='.:/php5.3/lib/php/') in /web/htdocs/www.xxxxxxxxxxxxxxxxxxxxxx.it/home/ask_a_question_popup.php on line 43

 

I'm trying to solve it but i'm not a programmer and i have very difficult..

 

Thanks in advance

 

Daniele

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...