Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ajax Buy Now


azer

Recommended Posts

Fantastic contribution, but having tried everything I can for the last 2 days, I cannot get this to work ont he product_info.php page, selecting either add to wishlist or add to cart returns an error. My reviews have also gone a bit screwy with a click showing the "all reviews" page...not sure if thats anything related to this though - ages since I actually clicked that link, so could have been broken for a while!! lol

 

 

 

Anyway, I dont have the qty select contribution mentioned earlier in this thread as a potential cause of the product_info page not working, and I am completely stuck. As no-one else seems to be posting ont his issue, have I missed something - like it is supposed to work on this page...?

 

 

 

Thanks for any and all help

Link to comment
Share on other sites

Would someone, who knows what they are doing, be willing to update this contribution WITH the flying image included in the code? That would sure be a benefit to those of us who are php challenged.

Link to comment
Share on other sites

Just wondering if there is no interest in this contribution or if no one is interested in taking on the above challenge?

 

I would also like an update with the flying image script as i can't get that to work if though someone tried helping me with it .. i don't know what i am missing.

 

An update would be great. or just tell in this forum as to exactly what to do please.

Link to comment
Share on other sites

The problem is solved. For working with STS need to add

<script language="JavaScript" src="includes/ajax_sc.js"></script><div id="divShoppingCard">$cartbox</div>

into your sts_template.html. Thank you Medreces, for this great contrib.

 

I've disabled the GZIP accelaration. Read all the user's post before posting.

 

Bye

my contribution: Alex's Contributions

Link to comment
Share on other sites

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 my product_info.php , there no line like this !! not near like too !

 

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']);

 

And in my application_top.php, there is already the code like the 2nd.

 

 

So, i can't get Ajax work when use "add to cart" button in product_info page ! There will be show the grey clock image (no green check image) but after that, page reload !!!! (:-) this contribute call : add page without reload !)

 

Is there somebody can help me ?!

 

Beside that, the fly image when add product (only on the demo site ! :-( ) is so cool !! Can i get it ?!

Paint for VietNamese :

Link to comment
Share on other sites

I have also disabled GZIP Compression and inserted that line yet i have an unusual problem.

 

When i click on "Buy Now" the rotating button comes and keeps rotating. If i reload the page then the item is added to the cart.

 

Has anyone got this to work with STS v4.2 (Latest Version)

 

Please help in this matter.

 

I've disabled the GZIP accelaration. Read all the user's post before posting.

 

Bye

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Another "gotsha" (besides the gzip): If you are "borrowing" the woutreload.js script from the original site, you either have to remove the doctype declaration (puts the browser in quicks mode) or change the code a little.

 

on line 413:

   fly_div.style.top = bounds_FLY.top - Math.ceil ( ( bounds_FLY.top - (center_target_top - bounds_FLY.height/2))/num_step * step ); + 'px';

 

change to:

   fly_div.style.top = bounds_FLY.top - Math.ceil ( ( bounds_FLY.top - (center_target_top - bounds_FLY.height/2))/num_step * step ) + 'px';

(remove the ';' in front of 'px'.

 

This works in strick-mode too!

 

All thanks go to the original author.

Link to comment
Share on other sites

Oh god, i still can't make this Ajax work on Product_info page !!! It work well at Product listing page !!!

Who can help me ?! I has midified many things in my shop for this contribuilt , so , now it's like a soup !!! :-(

Paint for VietNamese :

Link to comment
Share on other sites

  • 2 weeks later...

Still waiting !!! Author, help me !! Your demo site is so cool ! I'm not use "Show Cart after add product" so, i need this ajax work in product_info page !

Beside, the fly image is a wish ! :)

Paint for VietNamese :

Link to comment
Share on other sites

  • 1 month later...
Ok .. at last i got it to work. Just one weird thing now.

 

Whenever you press on "buy now" rather than having the image move to the shopping cart it just appears on top of the shopping cart and then it gets added to the shopping cart.

 

How do i get the image drag to the shopping cart when you press on "buy now"?

 

 

I have the same problem,how to solve it,I can't figuit out...

 

Anyone can give me a detail solution?

Link to comment
Share on other sites

I bet you didn't add the css definition to your stylesheet ;)

 

#flyDiv {
 position: absolute;
 top: 0;
 left: 0;
 width: 0;
 height: 0;
 margin: 0;
 padding: 0;
}

Edited by pixclinic
Link to comment
Share on other sites

I have the same problem,how to solve it,I can't figuit out...

 

Anyone can give me a detail solution?

 

why would you want to see a product fly over the screen to the cart box or more importantly why would a customer when it means so much trouble in even having to disable gzip compression?

It is nice for christmas as in "see grandchildren, a flying stake knife!" but I doubt if it has any positive influence on sales.

Treasurer MFC

Link to comment
Share on other sites

why would you want to see a product fly over the screen to the cart box or more importantly why would a customer when it means so much trouble in even having to disable gzip compression?

It is nice for christmas as in "see grandchildren, a flying stake knife!" but I doubt if it has any positive influence on sales.

 

I heard that Amazon an eBay are working on it - just kidding :P

Link to comment
Share on other sites

I heard that Amazon an eBay are working on it - just kidding :P

 

eBay maybe, amazon never.

But even if every major online store would, what is the added value for the customer other than delayed responses and possible javascript glitches here and there?

This is typical nintendo behaviour of developers and not retail professionals.

Treasurer MFC

Link to comment
Share on other sites

eBay maybe, amazon never.

But even if every major online store would, what is the added value for the customer other than delayed responses and possible javascript glitches here and there?

This is typical nintendo behaviour of developers and not retail professionals.

 

I agree. But I'm still using it :P : doesn't hurt my sales, and I sell more in my oscommerce than in AMZ Seller Central

Link to comment
Share on other sites

I agree. But I'm still using it :P : doesn't hurt my sales, and I sell more in my oscommerce than in AMZ Seller Central

 

Ok, I concede, if it helps your sales, you win the argument hands down !

Treasurer MFC

Link to comment
Share on other sites

Ok, I concede, if it helps your sales, you win the argument hands down !

 

But I agree on the fact that if you spend more time trying to make it work than packing orders, it's a bad idea to try so hard, haha!

Link to comment
Share on other sites

  • 5 weeks later...
I've disabled the GZIP accelaration. Read all the user's post before posting.

 

Bye

I've read all the posting, but it's still not working, how it works on STS v4.1?(in clean osc is fine)

 

when click add to cart the "wheel" is working, but it can't show "ok" image, after i reflash i can see it already in the shoppingcart.

 

sorry foy my poor english, i hope you can understand what i mean.

 

could anyone tell me step by step, thanks

Link to comment
Share on other sites

Hi, I've got the contribution installed and working with the exception of the "flying object to cart" effect. I have gone through the posts but I cannot find what was done to fix this for others. Can someone please repost the fix for this problem or direct me to the post that explains how to correct the "flying" image not working problem?

Thanks in advance

Link to comment
Share on other sites

Hello, I came accross this contrib about 2 weeks ago and absolutely loved it... I could not get it to work though...

 

I'm using the osCclean template from 7dana.com that uses STS 2.01 template system and have gone through this forum probably 20 times already.

 

When I click on the buy now button, it activates the loading image just fine, but that's where it stops, it doesn't seem to update the cart and continues to display the loading.gif image.

 

if you refresh the page, it will update the cart according to the number of times you press the buy now button, but it doesn't update automatically like it's supposed to, and I can't seem to get the fly image to work...

 

The template can be seen here:

 

7dana.com - osCclean

 

I am using the woutreload.js version so that I can get the fly effect... and have mimicked the code used at netso.ru, I have added the

 

<div id="flyDiv"></div>

 

before my $cartbox

 

I added the #flyDiv css to my stylesheet.css

 

I added the call to ajax_sc.js in the <head></head> tags of the html

 

and changed the link onclick event to mimic the one used on netso.ru

 

and still it just won't update automatically...

 

I don't know where to go from here I've been searching for almost a week for an answer and I just can't seem to find the answer, so I thought I would ask the kind people of this forum...

 

If you browse to our website and click on a category on the left side, you can click on the buy now button yourself and see what happens, you can even look at the code...

 

http://store.spanishmania.ca

 

Just let me know iff I should post any particular piece of code or if it would be better just to group all modified files into a zip and upload to my server for downloading?

 

Thanks in advance for any help,

Titanic_Fanatic

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...