Jump to content

Medreces

Members
  • Content count

    27
  • Joined

  • Last visited

2 Followers

Profile Information

  • Real Name
    Weretennikoff A.
  • Website

Recent Profile Visitors

5,823 profile views
  1. Medreces

    Ajax Buy Now

    Dear Sirs! Contribute Ajax Buy Now was created for the clean MS2. Together with it works without any problems. Unfortunately I can't guarantee the normal work of this contribution installed together with another mods. And, unfortunately I haven't enough free time for solving all your problems. Also having a very poor information about the problem itself I can't understand the reason why the program doesn't work. If you would like me to help you please send to PM links on your site and logins + passwords for the FTP access for it. P.S. In lib for this mod functions are used which can't work if GZIP is enable.
  2. Medreces

    Ajax Buy Now

    Sorry that I don't help you .I am on vacation. I will be available after 21st of July.
  3. Medreces

    Ajax Buy Now

    Hi, Drako Sorry for so late answer - job, job, job :( Code which makes 3 item: for method GET (button "BuyNow") reqAddCart.onreadystatechange = function() { if (reqAddCart.readyState == 4) { if (reqAddCart.responseJS) { document.location.href = reqAddCart.responseJS.ajax_redirect; return; } else { document.getElementById('divShoppingCard').innerHTML = '<table border="0" width="100%" cellspacing="0" cellpadding="2">'+(reqAddCart.responseText||'')+'</table>'; hideLoading(); if ( SHOW_ADDED ) { showOk(); timerID = setTimeout( "addHandler(document, \'mousemove\', hideOk)", 500); } } } } for method POST (button "AddProduct") reqAddCart.onreadystatechange = function() { if (reqAddCart.readyState == 4) { if (reqAddCart.responseJS) { document.location.href = reqAddCart.responseJS.ajax_redirect; return; } else { document.getElementById('divShoppingCard').innerHTML = '<table width="100%">'+(reqAddCart.responseText||'')+'</table>' if ( SHOW_ADDED ) { showOk(); timerID = setTimeout( "addHandler(document, \'mousemove\', hideOk)", 500); } } } } Luck! P.S. Show me your site with my installed mod.
  4. Medreces

    Ajax Buy Now

    Hi, Drako! The work of the mode is consists of 3 steps: 1. the preparation of l datas in brouser and sending of the request on server 2.datas are processing on the server by the standard style of osCOMMERCE and the answer is sending to brouser 3. after getting the answer from server shows it I think that in your case the 3rd step is not working. Please have a look how do you put the server's answer on the page. Luck!
  5. Medreces

    Ajax Buy Now

    2 Tony: Changes which you have done in the following functions tep_draw_input_field, tep_draw_textarea_field, tep_draw_hidden_field, tep_draw_pull_down_menu absolutely unusefull but they are not harmful. Please follow the istallation instructions (readme.txt)
  6. Medreces

    Ajax Buy Now

    1. in /includes/column_right.php <?php . . . if (COLUMN_RIGHT_IS_ON=='true') { // BOF: SHOPPING_CART if (BOX_SHOPPING_CART_IS_ON=='true' and BOX_SHOPPING_CART_COLUMN=='right') { ?> <tr> <td style="padding: 0"> <script language="JavaScript" src="includes/ajax_sc.js"></script> <div id="divShoppingCard"><table border="0" width="100%" cellspacing="0" cellpadding="2"><?php require(DIR_WS_BOXES . 'shopping_cart.php'); ?> </table></div> </td> </tr> <?php } // EOF: SHOPPING_CART . . . 2. in /includes/functions/html_output.php <?php . . . // Ultimate SEO URLs v2.1 // The HTML href link wrapper function if (SEO_ENABLED == 'true') { //run chemo's code function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls; if ( !is_object($seo_urls) ){ if ( !class_exists('SEO_URL') ){ include_once(DIR_WS_CLASSES . 'seo.class.php'); } global $languages_id; $seo_urls = new SEO_URL($languages_id); } // AJAX Addto shopping_cart - Begin $link_ajax = ''; if( tep_not_null($parameters) && preg_match("/buy_now/i", $parameters) && $page != 'ajax_shopping_cart.php'){ $link_ajax = '" onclick="doBuyNowGet(\'' . tep_href_link( 'ajax_shopping_cart.php', $parameters, $connection, $add_session_id, $search_engine_safe) . '\'); return false;'; } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id) . $link_ajax; // AJAX Addto shopping_cart - End } } else { //run original code // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $request_type, $session_started, $SID; if (!tep_not_null($page)) { die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } } else { die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($_sid)) { $link .= $separator . $_sid; } // AJAX Addto shopping_cart - Begin $link_ajax = ''; if( tep_not_null($parameters) && preg_match("/buy_now/i", $parameters) && $page != 'ajax_shopping_cart.php'){ $link_ajax = '" onclick="doBuyNowGet(\'' . tep_href_link( 'ajax_shopping_cart.php', $parameters, $connection, $add_session_id, $search_engine_safe) . '\'); return false;'; } return $link . $link_ajax; // AJAX Addto shopping_cart - End } } . . .
  7. Medreces

    Ajax Buy Now

    Hi Tony? All must work. Show me your web-site.
  8. Medreces

    Ajax Buy Now

    Thanks :rolleyes:
  9. Medreces

    Ajax Buy Now

    2 pixclinic: in product_info.php uncomment line 222: <!-- <td class="main" align="right" width="50"> x <input type="text" name="quantity" value="1" maxlenght="2" size="2"></td> --> in application_top.php find line 373: $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']); and replace it by: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+($HTTP_POST_VARS['quantity']>0?$HTTP_POST_VARS['quantity']:1), $HTTP_POST_VARS['id']); This should work. 2 Met00: This contribut v2.0 already works with the forms in which "action=add_product" and consequently with "add to cart" buttons. Example: www.vashop.ru regards
  10. Medreces

    Ajax Buy Now

    On my test script all right. Write, what you did? Or give me ftp-access for testing your site (log/pass in PM)
  11. Medreces

    Ajax Buy Now

    2 pixclinic It is much easier! See 2dn version from 23 Nov 2005
  12. Medreces

    Ajax Buy Now

    All is simple! Being based on it contrib it is done following changes: 1) in catalog/includes/modules/product_listing.php find: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>'; break; } replace with: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; if ( tep_has_product_attributes($listing['products_id']) ) { $lc_text = '<a href="'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text .= tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']); } else { $lc_text .= tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']); } $lc_text .= '">more info...</a> '; } else { $lc_text = tep_draw_form( 'cart_quantity_' . $listing['products_id'], tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing['products_id']) ) . '<input type="hidden" name="products_id" value="' . $listing['products_id'] . '"><input type="text" name="quantity" value="1" maxlength="5" size="5"><br>' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</form>'; } break; } 2) in catalog/includes/application_top.php find: $HTTP_POST_VARS['id']))+1 replace with: $HTTP_POST_VARS['id']))+($HTTP_POST_VARS['quantity']>0?$HTTP_POST_VARS['quantity']:1) Thanks brecz.
  13. Medreces

    Ajax Buy Now

    Roomeat and pixclinic, which contributes do you use or plan to use?
  14. Medreces

    Ajax Buy Now

    lemot, contrib CSS Button creates not valid html-code. Because tag "input" is an element of form. Specifying the type of this element as "submit" you get as a result the button after pushing wich submit a form follows. imho, dont use cotribut wich are not correspond standarts. regards
×