Jump to content

Medreces

Members
  • Content count

    27
  • Joined

  • Last visited

Everything posted by Medreces

  1. Medreces

    Ajax Buy Now

    Questions? Ask...
  2. 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.
  3. Medreces

    Ajax Buy Now

    Sorry that I don't help you .I am on vacation. I will be available after 21st of July.
  4. 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.
  5. 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!
  6. 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)
  7. 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 } } . . .
  8. Medreces

    Ajax Buy Now

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

    Ajax Buy Now

    Thanks :rolleyes:
  10. 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
  11. 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)
  12. Medreces

    Ajax Buy Now

    2 pixclinic It is much easier! See 2dn version from 23 Nov 2005
  13. 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.
  14. Medreces

    Ajax Buy Now

    Roomeat and pixclinic, which contributes do you use or plan to use?
  15. 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
  16. Medreces

    Ajax Buy Now

    Lemot, thank you for your message! Unfortunately I can't get the same problem on my sites. Could you please show the HTML- code of the page with the problem or give me please the URL on the site with this problem. Waiting for your answer
  17. Medreces

    Ajax Buy Now

    2 Tveitan: As I have already told you previousely in our private mailing the reason of your problem is template Algozone. CSS for body can be defineded in the header.php. It is necessary to deliver these definitions into ajax_shopping_card.php. I'll try to help you in this problem very soon. 2 Met00: The differences in cool code :) and code mod are only in the several of the visual confirmations that the product was put into the shopping cart. Some idears of another visual confirmations: it can be done smthg like this: to move the shopping cart to the centre of the window, to change the style of the cart at the momemt of buing and so on. The function of the mod at that momemt is not changed. If you like to make the "coo"l visual you need to solve the next questions: 1. To choose the item that will be moved into the shopping cart and to mark it with the unique ID 2. To deliver into doBuyNowGet() not only url but also this ID 3. In case of the positive answer from the server to organize the fly of this item into the cart. The prototype fly ( you have told me about it in your post) will help you in this. Injoy! P.S. Thanks for my wife for her help in writing the posts. :-"
  18. Medreces

    Ajax Buy Now

    Buy now without reload
  19. Medreces

    Ajax Buy Now

    Vashop.ru
  20. Medreces

    Ajax Buy Now

    New release (v 2.0) 2 Met00: could you please send me the information about FTP- acsess on your site (in PM) and I'll help you to solve your problem. You can belive that it 'll be usefull for evebody. Regards,
  21. Medreces

    Ajax Buy Now

    Hi everybody! I am sorry that I can't answer you immediately or soon after your question: I am not very often here. This conttibution works good on the clean OS COMMERCE. Now I am working with the new release which I'll try to make friends with SEO-url 's contributions. Overwhile the sending of forms will be added .The visual of confirmation will be changed ( It will become more simple). Thank you for your understanding, Medreces.
  22. Medreces

    Ajax Buy Now

    Hi, Lampb! Yes, you are right.You have the same problems as Dennisra. I plan to have the new release till this weekend. Thank you for you worm words . Kind regards, :rolleyes:
  23. Medreces

    Ajax Buy Now

    yes, i have already answered
  24. Medreces

    Ajax Buy Now

    2 Dennisra: Unfortunately this version does not work with sending POST-data. It will be in following release. 2 pebosi Can you show yours html_output.php? (my e-mail you know) Thanks all for good words!
×