boxtel Posted January 13, 2006 Posted January 13, 2006 Support for : http://www.oscommerce.com/community/contributions,3929 Quote Treasurer MFC
boxtel Posted January 13, 2006 Author Posted January 13, 2006 Support for : http://www.oscommerce.com/community/contributions,3929 missed in the instructions: in application_top.php add in the big case : case 'buy_tinnx' : if (isset($_GET['products_id'])) { if (tep_has_product_attributes($_GET['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id'])); } else { if (tep_get_products_stock($_GET['products_id']) > 0) { $cart->add_cart($_GET['products_id'], $cart->get_quantity($_GET['products_id'])+1); } } } if (isset($_GET['buy_tinn_add'])) { if (tep_has_product_attributes($_GET['buy_tinn_add'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['buy_tinn_add'])); } else { if (tep_get_products_stock($_GET['buy_tinn_add']) > 0) { $cart->add_cart($_GET['buy_tinn_add'], $cart->get_quantity($_GET['buy_tinn_add'])+1); } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; so that both products are added to the basket. Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 in admin, I've just add 2 products. I've this error: Fatal error: Call to undefined function: tep_get_products_image() in /web/htdocs/www.100asa.it/home/securecentoasa/2gether.php on line 272 and, on catalog, the two small image are missed. Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 in admin, I've just add 2 products.I've this error: Fatal error: Call to undefined function: tep_get_products_image() in /web/htdocs/www.100asa.it/home/securecentoasa/2gether.php on line 272 and, on catalog, the two small image are missed. ah, I thought that was a standard function. 1)in admin/includes/functions/general.php add: function tep_get_products_image($product_id) { $product_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_image']; } 2)in the catalog module change DIR_WS_PRODUCT_IMAGES to DIR_WS_IMAGES I have my product images separated from my normal site images. Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 1st problem: admin section, when I add a 2gether: Warning: Missing argument 2 for tep_info_image() in /web/htdocs/www.100asa.it/home/securecentoasa/includes/functions/general.php on line 482 2nd problem: image are too big; insted it's possible to have a little image? ps: how can I do to delete one 2gether offer? Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 1st problem:admin section, when I add a 2gether: Warning: Missing argument 2 for tep_info_image() in /web/htdocs/www.100asa.it/home/securecentoasa/includes/functions/general.php on line 482 2nd problem: image are too big; insted it's possible to have a little image? ps: how can I do to delete one 2gether offer? in admin/includes/functions/general.php: change this : function tep_info_image($image, $alt, $width = '', $height = '') { to this : function tep_info_image($image, $alt = '', $width = '', $height = '') { Quote Treasurer MFC
boxtel Posted January 13, 2006 Author Posted January 13, 2006 1st problem:admin section, when I add a 2gether: Warning: Missing argument 2 for tep_info_image() in /web/htdocs/www.100asa.it/home/securecentoasa/includes/functions/general.php on line 482 2nd problem: image are too big; insted it's possible to have a little image? ps: how can I do to delete one 2gether offer? 2) well, I would recommend a thumbnail contribution but you could change the codes like this : tep_image(DIR_WS_IMAGES . $product_a['products_image'], str_replace('\'','`',$product_a['products_name'])) to this: tep_image(DIR_WS_IMAGES . $product_a['products_image'], str_replace('\'','`',$product_a['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) this means adding ", SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT" as parameters to the all tep_image function calls for the products (4) Quote Treasurer MFC
boxtel Posted January 13, 2006 Author Posted January 13, 2006 1st problem:admin section, when I add a 2gether: Warning: Missing argument 2 for tep_info_image() in /web/htdocs/www.100asa.it/home/securecentoasa/includes/functions/general.php on line 482 2nd problem: image are too big; insted it's possible to have a little image? ps: how can I do to delete one 2gether offer? to delete an offer, you either disable it or press the delete button Quote Treasurer MFC
boxtel Posted January 13, 2006 Author Posted January 13, 2006 Support for : http://www.oscommerce.com/community/contributions,3929 when you encounter that only 1 product is added, that is caused by the fact that the normal add to cart form is closed way down at the end of the page. solution: look for </form> at the very end of product_info.php and remove it. add </form> just after : <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> that will make sure that the normal add to cart form is closed before the 2gether form is opened. Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 2) well, I would recommend a thumbnail contribution but you could change the codes like this : tep_image(DIR_WS_IMAGES . $product_a['products_image'], str_replace('\'','`',$product_a['products_name'])) to this: tep_image(DIR_WS_IMAGES . $product_a['products_image'], str_replace('\'','`',$product_a['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) this means adding ", SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT" as parameters to the all tep_image function calls for the products (4) what file? there is not possible to have a little image, as a small picture in product info? Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 what file?there is not possible to have a little image, as a small picture in product info? ofcourse: in includes/modules/2gether.php change: tep_image(DIR_WS_IMAGES . $product_a['products_image'], str_replace('\'','`',$product_a['products_name'])) into: tep_image(DIR_WS_IMAGES . $product_a['products_image'], str_replace('\'','`',$product_a['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) change: tep_image(DIR_WS_IMAGES . $product_b['products_image'], str_replace('\'','`',$product_b['products_name'])) into: tep_image(DIR_WS_IMAGES . $product_b['products_image'], str_replace('\'','`',$product_b['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 sorry, what's line of includes/modules/2gether.php? and also in admin? where? Quote Skype: centoasa Skype: remigioruberto
joquinha Posted January 13, 2006 Posted January 13, 2006 when you encounter that only 1 product is added, that is caused by the fact that the normal add to cart form is closed way down at the end of the page. solution: look for </form> at the very end of product_info.php and remove it. add </form> just after : <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> that will make sure that the normal add to cart form is closed before the 2gether form is opened. I still have this problem. i just move the <\form> but still not working, only one product is add Quote
100asa Posted January 13, 2006 Posted January 13, 2006 Image in pop-up don't work! Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 I still have this problem. i just move the <\form> but still not working, only one product is add my mistake, change this in application_top.php: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; to this: case 'add_product' : if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) { if (tep_get_products_stock($_POST['products_id']) > 0) $cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $_POST['id']))+1, $_POST['id']); } if (isset($_POST['buy_tinn_add']) && is_numeric($_POST['buy_tinn_add'])) { if (tep_get_products_stock($_POST['buy_tinn_add']) > 0) { $cart->add_cart($_POST['buy_tinn_add'], $cart->get_quantity(tep_get_uprid($_POST['buy_tinn_add'], $_POST['id']))+1, $_POST['id']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; and remove this: case 'buy_tinnx' : if (isset($_GET['products_id'])) { if (tep_has_product_attributes($_GET['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id'])); } else { if (tep_get_products_stock($_GET['products_id']) > 0) { $cart->add_cart($_GET['products_id'], $cart->get_quantity($_GET['products_id'])+1); } } } if (isset($_GET['buy_tinn_add'])) { if (tep_has_product_attributes($_GET['buy_tinn_add'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['buy_tinn_add'])); } else { if (tep_get_products_stock($_GET['buy_tinn_add']) > 0) { $cart->add_cart($_GET['buy_tinn_add'], $cart->get_quantity($_GET['buy_tinn_add'])+1); } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; that was obsolete. Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 on line 123 and 124 in admin/2gether.php, I've add this: SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT to have a small image, but I've small image only when edit offer. *********** PROBLEM: the amount of cart is wrong, whit this offer in. Please try with http://www.100asa.it/10-anelli-aggiuntivi-...tml?language=it Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 on line 123 and 124 in admin/2gether.php, I've add this:SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT to have a small image, but I've small image only when edit offer. *********** PROBLEM: the amount of cart is wrong, whit this offer in. Please try with http://www.100asa.it/10-anelli-aggiuntivi-...tml?language=it PROBLEM: -> read the post just above your post. Quote Treasurer MFC
boxtel Posted January 13, 2006 Author Posted January 13, 2006 on line 123 and 124 in admin/2gether.php, I've add this:SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT to have a small image, but I've small image only when edit offer. *********** PROBLEM: the amount of cart is wrong, whit this offer in. Please try with http://www.100asa.it/10-anelli-aggiuntivi-...tml?language=it for small images in admin (why?) you can change these lines: tep_info_image(tep_get_products_image($tInfo->product1_id)) onto these lines : tep_info_image(tep_get_products_image($tInfo->product1_id),'',SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) All of them Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 I've already made this change, but the problem remain! Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 Image in pop-up don't work! you need to change in includes/modules/2gether.php : tep_href_link(FILENAME_POPUP_IMAGE, 'products_id=' into tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' Quote Treasurer MFC
100asa Posted January 13, 2006 Posted January 13, 2006 Sorry for previous reply! I'm already made change on line 123 and 124, so you tell on post #18, but I can see little image only when edit offer. I want little image because, sometimes, I've a great image for product, and I spend much time to load a admin page. For cart problem, I've already made change on post #15, but the problem remain. Quote Skype: centoasa Skype: remigioruberto
100asa Posted January 13, 2006 Posted January 13, 2006 Suggestion: it's possible to have, under the two 2gether products, the price for the signle product, as I see on admin? So my customer can see the real offer and discount. Quote Skype: centoasa Skype: remigioruberto
boxtel Posted January 13, 2006 Author Posted January 13, 2006 Sorry for previous reply!I'm already made change on line 123 and 124, so you tell on post #18, but I can see little image only when edit offer. I want little image because, sometimes, I've a great image for product, and I spend much time to load a admin page. For cart problem, I've already made change on post #15, but the problem remain. you cannot put this module inside your "add to cart" form, it has its own form. Quote Treasurer MFC
boxtel Posted January 13, 2006 Author Posted January 13, 2006 Suggestion: it's possible to have, under the two 2gether products, the price for the signle product, as I see on admin? So my customer can see the real offer and discount. yes. change : <?php echo '</td><td align="center" width="100px"><img src="images/icon_plus.gif" border="0" style="vertical-align: middle"></td>' . to: <?php echo '<br>'.$currencies->format($product_a['products_price']).'</td><td align="center" width="100px"><img src="images/icon_plus.gif" border="0" style="vertical-align: middle"></td>' . change: echo '</td><td width="2%"></td>'. to: echo '<br>'.$currencies->format($product_b['products_price']).'</td><td width="2%"></td>'. Quote Treasurer MFC
joquinha Posted January 13, 2006 Posted January 13, 2006 I have just resolved all problems except one: I can't display the images for the produts in checkout_confirmation.php. in the properties of the images the link is images/save-icon_sm.gif Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.