Jump to content



Photo
* * * * * 3 votes

Ajax Buy Now


  • Please log in to reply
233 replies to this topic

#221   Simpel

Simpel
  • Members
  • 104 posts
  • Real Name:de wit

Posted 17 May 2011 - 20:59

in ajax.cs.js

I had to change

url = 'index.php?option=com_oscommerce&osMod=ajax_shopping_cart'  + ( senddata.products_id ? 'products_id='+senddata.products_id+'&' : "" ) + 'action=add_product';

into

url = 'index.php?option=com_oscommerce&osMod=ajax_shopping_cart' + '&format=ajax' + ( senddata.products_id ? 'products_id='+senddata.products_id+'&' : "" ) + 'action=add_product';

but JavaScript code generated by backend is invalid! still exists and instead of the whole page only the div from the shoppingcart.php is shown in the shoppingcart box instead of updating this box. Where should I look?

#222   Simpel

Simpel
  • Members
  • 104 posts
  • Real Name:de wit

Posted 18 May 2011 - 10:58

<?php
/**
  AJAXBuyNow v2.0

  author Weretennikoff Andrew aka Medreces medreces@yandex.ru

  Released under the GNU General Public License
 */
// Ïîäêëþ÷àåì áèáëèîòåêó ïîääåðæêè.
  require_once('includes/classes/sybsys.php');
// Ñîçäàåì ãëàâíûé îáúåêò áèáëèîòåêè.
// Óêàçûâàåì êîäèðîâêó ñòðàíèöû (îáÿçàòåëüíî! à ìîæåò ïîòîì?).
  $JsHttpRequest =& new Subsys_JsHttpRequest_Php('');
  foreach( $_REQUEST as $key => $value) $HTTP_POST_VARS[$key]=$value;
  require('includes/application_top.php');
  $navigation->remove_current_page();
// À âîò è êîäèðîâî÷êà!!!!
  $JsHttpRequest->setEncoding(CHARSET);

  require(DIR_WS_BOXES . 'shopping_cart.php');

  require('includes/application_bottom.php');
?>

result into Fatal error: Cannot redeclare class shoppingCart in /public_html/includes/classes/shopping_cart.php on line 13

what's happening?

#223   Simpel

Simpel
  • Members
  • 104 posts
  • Real Name:de wit

Posted 18 May 2011 - 20:16

No problem on Safari on my end, everything seems to be cross browser compatible.
I still can't get the flying effect working in the listing page (JavaScript code generated by backend is invalid, like betty88)



Is there someone who knows this problem and solved it?

#224   Simpel

Simpel
  • Members
  • 104 posts
  • Real Name:de wit

Posted 19 May 2011 - 15:53

Is there someone who knows this problem and solved it?


firefox says

' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: chrome://firebug/content/spy.js :: callPageHandler :: line 744" data: no]

Should it be a wrong string/url in ajax.sc.js?

#225   catch

catch
  • Members
  • 78 posts
  • Real Name:Ali

Posted 22 May 2011 - 18:24

You're welcome.


I use this and its working in Firefox and IE, but now its showing erro in IE, in the bottom of IE.
The erro the like the following:

Details about the error on the website
Message: An unknown runtime error
Line: 274
Character: 25
Code: 0
URI: http://www.mysite/aj...ript/ajax_sc.js

I need help please.

Edited by catch, 22 May 2011 - 18:27.


#226   Simpel

Simpel
  • Members
  • 104 posts
  • Real Name:de wit

Posted 25 May 2011 - 09:47

I use this and its working in Firefox and IE, but now its showing erro in IE, in the bottom of IE.
The erro the like the following:

Details about the error on the website
Message: An unknown runtime error
Line: 274
Character: 25
Code: 0
URI: http://www.mysite/aj...ript/ajax_sc.js

I need help please.


did you upload the newest version of ajax_sc.js?

#227   catch

catch
  • Members
  • 78 posts
  • Real Name:Ali

Posted 18 June 2011 - 20:11

Yes i do. still have the problem.

#228   sportstolen

sportstolen
  • Members
  • 88 posts
  • Real Name:Johan Karlberg

Posted 11 October 2011 - 23:04

Hi

Can you make so the loading image are shown a little bit longer?

#229   matevzl

matevzl
  • Members
  • 4 posts
  • Real Name:Matevz Likar

Posted 24 October 2011 - 17:44

Hello,

thank you for great script and the update. But when I upload the new ajax_sc.js file all my jquery scripts stop working (they disappear). Can someone suggest how I could fix this?

thank you in advance

#230   tufailshaikh

tufailshaikh
  • Members
  • 5 posts
  • Real Name:Tufail

Posted 03 August 2012 - 08:13

hi guys,
i realy need your help to improve my site.... i am using Ajax Buy Now addons.. that is realy great. but need some changes in this cart design


i need like.

qty | item name Remove
---------------------------------------------------
1 | item name1 x
--------------------------------------------------
2 | item name 2 x


where x is a delete button...
i am able to show all the 3 fields qyt, item name, price, but only i have problem with remove button
I want add this button on ajax buy now order cart to remove the individual items...


please help me.. thanks in advance

Attached Files



#231   matevzl

matevzl
  • Members
  • 4 posts
  • Real Name:Matevz Likar

Posted 10 September 2012 - 12:13

After the script stopped working on the product list page (index.php), while still working on the product page (product_info.php), I tried the fix on the Ajax buy now contribution site - uploaded new ajax_sc.js file, but it broke majority of my jquery scripts.
So I compared the old and new ajax_sc.js file, ignored the bulk of the new code at the start and performed only smaller changes:

replace (around line 249)
if (s.setAttribute) s.setAttribute('src', href); else s.src = href;

with

s.type = "text/javascript";
				//if (s.setAttribute) s.setAttribute('src', href); else s.src = href;

				$.get(
					href,
					function(data) {
						s.innerHTML = data;
					}
				);

replace (around line 416)
reqAddCart.caching = false;
reqAddCart.open('GET', link, true);
reqAddCart.send(null);

with

reqAddCart.caching = false;
reqAddCart.open('GET', link, true);
reqAddCart.send();

Now it works for me, together with my jquery scripts. Tested in Safari (Mac), IE (Win), Chrome (Win&Mac) and Firefox (Win&Mac).

#232   matevzl

matevzl
  • Members
  • 4 posts
  • Real Name:Matevz Likar

Posted 10 September 2012 - 12:38

ops there was a mistake in my previous post - the first line should be removed from the script (or commented out):

replace (around line 416)
reqAddCart.caching = false;
  reqAddCart.open('GET', link, true);
  reqAddCart.send(null);

with

//reqAddCart.caching = false;
  reqAddCart.open('GET', link, true);
  reqAddCart.send();


#233   rbrookstx

rbrookstx
  • Members
  • 13 posts
  • Real Name:Robert Brooks

Posted 06 December 2012 - 22:13

I'm running osc 2.3.1 and I have everything working, except for the cart update process. my theme just shows total items in the cart. I need to have this functionality. any ideas?

#234   tufailshaikh

tufailshaikh
  • Members
  • 5 posts
  • Real Name:Tufail

Posted 02 February 2013 - 17:25

hi friends please help me . i think my sybsys.php is not correct could you please help me guys because its printing the html code not actual design view in ajax_shopping_cart.php

please help me.