Jump to content



Photo
* * * * * 5 votes

Simple Checkout - for 2.3.1 (official support thread)


  • Please log in to reply
364 replies to this topic

#41   varina

varina
  • Members
  • 36 posts
  • Real Name:Varina Schecter
  • Gender:Female
  • Location:The Dalles, OR

Posted 11 February 2012 - 00:19

@varina
Here are your updated instructions. If they work, let me know and I'll add it as a compatibility feature.

2- Open catalog/checkout_confirmation.php
Find:
-----
require('includes/application_top.php');
Add after:
----------
  $_SESSION['FixOrder'] = "";
Find: (Put the entire sentence because there are two equal sentences, the last)
-----
   for ($i=0, $n=sizeof($products); $i<$n; $i++)
	{
Add after:
----------
   $_SESSION['FixOrder'] =  $_SESSION['FixOrder'] . $products[$i]['name'] . " x " . $products[$i]['qty'] . " ";
Find:
-----
	if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes']))
	 while (list($option, $value) = each($products[$i]['attributes']))
	  {
	  echo tep_draw_hidden_field('attr[' . $products[$i]['id'] . '][' . $option . ']', $value);
	  $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");
	  $attributes_values = tep_db_fetch_array($attributes);
	  $productAttributes .= '<br /><small><i> - ' . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'] . '</i></small>';
	  }
Replace with this:
------------------
	if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes']))
	 while (list($option, $value) = each($products[$i]['attributes']))
	  {
	  echo tep_draw_hidden_field('attr[' . $products[$i]['id'] . '][' . $option . ']', $value);
	  $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");
	  $attributes_values = tep_db_fetch_array($attributes);
	  $productAttributes .= '<br /><small><i> - ' . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'] . '</i></small>';
	  $_SESSION['FixOrder'] =  $_SESSION['FixOrder'] . "(". $attributes_values['products_options_name'] . ': ' . $attributes_values['products_options_values_name'] .")";
	  }
	$_SESSION['FixOrder'] =  $_SESSION['FixOrder']  ." | ";

Edited to change code for Varina.


Thanks for converting this for me. Unfortunately it didn't do what it was supposed to. I got a input text box instead of my item name. Without any coding in checkout.php I got the same thing yesterday. So it looked all pretty but didn't do anything. /sad.png' class='bbc_emoticon' alt=':(' />

I double checked the add on's coding in 3 page checkout, and while it kind of worked, it didn't quite give me what I wanted with more than one item in the cart.

I need to abandon that add on and find a better one. Grr...

It is so annoying that they changed the Paypal checkout from v 2.2. I really liked the itemized descriptions...now I have to try and find something else that will work.


@varina

I also uploaded a fix to the breadcrumb issue.

AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHH!!

I do believe this thing is bug free. Now, THAT is refreshing.

if I missed anything, then please let me know / remind me.

@varina & @oxwivi Tell me how those last compatibility instructions work for you. When I have working instructions for merging other contributions, I'll get them uploaded and cross referenced with the other contribs.


Yay on the breadcrumbs. I downloaded your newest version and things look great.

Two little things I would like to modify...

The hang time on the error boxes - how do I make it longer? (a lot of our customers are old and slow...and the box disappears kind of quick...)

A space below (between) the products. I am a little OCD too, and those darn touching images really bother me, and I've tried a bunch of different ways to add a space, and can't find the right way to do it. /wink.png' class='bbc_emoticon' alt=';)' />

Thanks.
-V

#42   JeffDaniels

JeffDaniels
  • Members
  • 4 posts

Posted 11 February 2012 - 02:48

Thanks for your work on this contribution.

I am trying to use Paypal Express and it just keeps sending me back to checkout.php. Here's the flow with the new contrib.. I login, go to checkout.php, it gives me a button to checkout using Paypal, I click it, log in to Paypal, then it takes me back to the checkout.php, when I click on confirm order it tells me to "Please select a payment method" and the order never gets processed.

I would like it to work like this and need to know if it's possible: go to checkout.php, click confirm, sends you to paypal, pay, returns back to "thank You" message. I like the express module because an order will not get generated in the admin if someone backs out of Paypal like in the standard module.

Any help would be greatly appreciated.

-Jeff

#43   fulluvscents

fulluvscents
  • Members
  • 305 posts
  • Real Name:Jetta
  • Gender:Female
  • Location:Fort Wayne, Indiana

Posted 11 February 2012 - 13:08

@varina
The hang time on the message dialog is here. Just change the 2000, maybe to 3000.

setTimeout(function (){$('#message').dialog('close');$('#messagecontent').empty();}, 2000);
Cart item display is here:
    echo '<div class="contentText">
			 <div class="left" style="width:' . SMALL_IMAGE_WIDTH . 'px;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>
	   <div class="left wid200"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong>' . $stockCheck . $productAttributes . '</a></div>
	   <div class="left wid75 t-center">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id'])) . '</div>
	   <div class="left wid75 t-center">' . tep_draw_input_field('qty[' . $products[$i]['id'] . ']', $products[$i]['quantity'], 'size="2" data-pID="' . $products[$i]['id'] . '"') . '</div>
	   <div class="left wid75 t-center">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</div>
	   <div class="left wid25 t-right iconred mrt5 pointer" id="cartDelete" data-pID="' . $products[$i]['id'] . '">&#10008;</div>
	   <div class="clear"></div>
	  </div>';

Change the first line to
echo '<div class="contentText padtop10">

If the padding is too much, you'll need to add a class for a smaller pad, and apply that class to the div.

@JeffDaniels

I assume it works correctly when you click on PayPal from the shopping cart or from the stock checkout?

Where is your website? I'd like to see it in action so I know exactly what it's doing.

#44   JeffDaniels

JeffDaniels
  • Members
  • 4 posts

Posted 11 February 2012 - 15:31

Thanks for the reply. If I use Paypal express with the out of the box checkout, it works fine. When I have this contrib installed it doesn't matter if I click "checkout with Paypal" on the shopping_cart.php or checkout.php it always brings me back to the checkout.php page after I login to paypal and select to pay. Then it won't let me confirm because it says I need to select a payment. My test site is located here: http://6litereaterde...s.com/teststore

Thanks for any help you can give.

Jeff

#45   JeffDaniels

JeffDaniels
  • Members
  • 4 posts

Posted 11 February 2012 - 15:33

What I would like it to do is after paying with Paypal to take me to the "Thank You for your order" page and have the order processed, Thanks.

#46   dog-toyz

dog-toyz
  • Members
  • 5 posts
  • Real Name:Andy

Posted 11 February 2012 - 17:53

First of all this is a great contrib thanks!

I'm using a custom theme and having trouble with the placement of the login/create account box that first appears in checkout. Can you direct me to the css to change it?

when I look at it in Chrome Inspect Element it displays as below:


<div style="outline-width: 0px; outline-style: initial; outline-color: initial; height: auto; width: 400px; top: -1291px; left: 748px; display: block; z-index: 1007; " class="ui-dialog ui-widget ui-widget-content ui-corner-all " tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-account"><div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" style="display: none; "><span class="ui-dialog-title" id="ui-dialog-title-account">&nbsp;</span><a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"><span class="ui-icon ui-icon-closethick">close</span></a></div>.............</div>

I can find all the code in between but would like to alter the placement of the div it is inside.

Thanks

Edited by dog-toyz, 11 February 2012 - 17:55.


#47   mumme

mumme
  • Validating
  • 121 posts
  • Real Name:magnus andersson
  • Gender:Male
  • Location:Stockholm | sweden

Posted 11 February 2012 - 20:59

Incredibly goodaddon,a must for anyOscommercestores!
This isreally the bestcheckoutsystemever madefor Oscommerce. The Installation only takes a minuteto do andwill certainlymake it easier foryour customersto shopat your store.

@fulluvscents is my Oscommerce hero! Fantastic work, and a big step to bring oscommerce to a modern ecommerce system thats fits the needs of 2012.
Thank you so much for your contribution.

#48   varina

varina
  • Members
  • 36 posts
  • Real Name:Varina Schecter
  • Gender:Female
  • Location:The Dalles, OR

Posted 11 February 2012 - 22:09

@dog-toyz

The dialog boxes are in the following code:

Find:
$('#message').dialog(
  {
  shadow: true,
  modal: false,
  draggable: false,
  resizable: false,
  closeOnEscape: false,
  position: ['center', 50],
  width: 480,
  height: 75,
  open: function ()
   {
   $('.ui-dialog-titlebar', $(this).parent()).hide();
   setTimeout(function (){$('#message').dialog('close');$('#messagecontent').empty();}, 2000);
   }
	 });
$('#loader').dialog(
  {
  shadow: false,
  modal: true,
  draggable: false,
  resizable: false,
  closeOnEscape: false,
  position: ['center', 100],
  width: 75,
  height: 100,
  open: function ()
   {
   $('.ui-dialog-titlebar', $(this).parent()).hide();
   $(this).parent().addClass('nobord');
	  },
	 });
  $('#account').dialog(
  {
  shadow: true,
  draggable: false,
  resizable: false,
  closeOnEscape: false,
  width: 400,
  position: ['center', 100],
  open: function ()


$('#addresses').dialog(
{
shadow: false,
modal: true,
width: 400,
position: ['center', 100],
open: function ()

Under position: change the number 100 to move the placement of the boxes up or down.

#49   fulluvscents

fulluvscents
  • Members
  • 305 posts
  • Real Name:Jetta
  • Gender:Female
  • Location:Fort Wayne, Indiana

Posted 11 February 2012 - 22:58

I put up a small fix for PP Express, but I didn't like it. Will post a better one soon.

Edited by fulluvscents, 11 February 2012 - 23:10.


#50   fulluvscents

fulluvscents
  • Members
  • 305 posts
  • Real Name:Jetta
  • Gender:Female
  • Location:Fort Wayne, Indiana

Posted 11 February 2012 - 23:37

@JeffDaniels

I still don't like the fix per se, but it works.

In checkout_confirmation.php

Find and CUT:
// CHECKOUT START
  if (CHECKOUT_ENABLED == 'True') tep_redirect(tep_href_link(FILENAME_CHECKOUT, '', 'SSL'));
// CHECKOUT END
Then PASTE it AFTER the following:
  if (is_array($payment_modules->modules)) {
	$payment_modules->pre_confirmation_check();
  }

Edited by fulluvscents, 11 February 2012 - 23:38.


#51   booker3672

booker3672
  • Members
  • 39 posts
  • Real Name:vincent booker
  • Gender:Male
  • Location:Loveland, Co

Posted 12 February 2012 - 00:57

When I try and add more than one different products to the cart and checkout I get this error...

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept
cookies.


FYI...my shop has been motified to allow a customer to add more than one different size attribute to there order. (they can add and order one small, 2 mediums, 3 larges on the product info page.)

Love the addon. Any help would be appreciated...

#52   JeffDaniels

JeffDaniels
  • Members
  • 4 posts

Posted 12 February 2012 - 03:43

AWESOME. The order gets processed now. It works the best if you click the stock "checkout" button on the shopping cart then click "checkout with Paypal" on checkout.php. Paying with Paypal this way will take you to a "thank you" page and the order is processed correctly. This is the only way it will work but it's better than what it was. Thank You for your help getting this working. I will just remove the "checkout by paypal" on the shopping cart and the "confirm order" button on checkout.php. This will force customers to create an account and then use paypal to pay. Thanks so much for all your work on this.

Jeff

#53   pantarra

pantarra
  • Members
  • 41 posts
  • Real Name:Gina

Posted 12 February 2012 - 03:51

Thanks so much for this addon , really nice work but my problem im getting a error from paypal
The link you have used to enter the PayPal system contains an incorrectly formatted item amount.
im using paypal payments standard

also the Quantity field ( im using OSC for paying rent online and setting the amount of rent as the quantity the price $1.00) every time I try to input say 300 I can only input 1 number at a time, this may be confusing to tenant

also since im not shipping a product I dont want any shipping I tried taking out shipping methods
and I get error Shipping selection error you must select shipping method, but when I turn on shipping with zero amount no error but I prefer not to show shipping

Thank you so much for this excellent addon

#54   PupStar

PupStar
  • Members
  • 673 posts
  • Real Name:Mark
  • Gender:Male

Posted 12 February 2012 - 12:57

@fulluvscents, still the same undefined error. I tried a few things myself, with the same results. This crazy, there's no error in the code, and yet... argh!


Hi Jetta,

I have finally got around to testing your baby /w00t.gif' class='bbc_emoticon' alt='(w00t)' /> and wow I like it!

I too also get the parse error when creating an account but if you then click the checkout button again the account has been created and goes direct to the payment/shipping page.

A couple of suggestions I have are:

1. The input fields seem a little short in width, maybe it would be worth adding an extra css style to define the width of the input fields.

2. A thought would be to not show the 'Sign In' or 'Guest Checkout' buttons if the customer has opted to create an account. If anything a 'Back' button would be more suitable if anything. The same would also apply for the buttons on the guest checkout.

Apart from the above I can not think of anything else, great work, very well done.

Mark

Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)


#55   fulluvscents

fulluvscents
  • Members
  • 305 posts
  • Real Name:Jetta
  • Gender:Female
  • Location:Fort Wayne, Indiana

Posted 12 February 2012 - 13:09

@pantarra

The link you have used to enter the PayPal system contains an incorrectly formatted item amount.

I'm not sure about that one.

every time I try to input say 300 I can only input 1 number at a time


in checkout.php, FIND:
$('input', $('#cartContent')).bind('keyup', checkout.cartUpdate);
change to:
$('input', $('#cartContent')).bind('change', checkout.cartUpdate);

also since im not shipping a product I dont want any shipping

I uploaded a new version (1.4) to fix this. I do believe the general consensus is that a cart weight of zero means that no shipping should be required.

#56   fulluvscents

fulluvscents
  • Members
  • 305 posts
  • Real Name:Jetta
  • Gender:Female
  • Location:Fort Wayne, Indiana

Posted 12 February 2012 - 13:23

Hi Jetta,

I have finally got around to testing your baby /w00t.gif' class='bbc_emoticon' alt='(w00t)' /> and wow I like it!

I too also get the parse error when creating an account but if you then click the checkout button again the account has been created and goes direct to the payment/shipping page.

A couple of suggestions I have are:

1. The input fields seem a little short in width, maybe it would be worth adding an extra css style to define the width of the input fields.

2. A thought would be to not show the 'Sign In' or 'Guest Checkout' buttons if the customer has opted to create an account. If anything a 'Back' button would be more suitable if anything. The same would also apply for the buttons on the guest checkout.

Apart from the above I can not think of anything else, great work, very well done.


Mark


The undefined error reference above was related to an add-on, not part of the checkout. This is the first I've heard of the parse error on create account. I'm interested in seeing it, since I'm not able to replicate it.

Styling is a matter of personal preference. Just change/add/remove classes and apply them as you see fit. Classes are in the <style> tags and the input fields are at the bottom of the page, with a little bit scrambled through the top 1/3 of the page ($action section).

A back button could be implemented, but honestly, it is what it is now, and unless it's a certifiable bug, I don't plan on changing anything else.

#57   PupStar

PupStar
  • Members
  • 673 posts
  • Real Name:Mark
  • Gender:Male

Posted 12 February 2012 - 13:33

The undefined error reference above was related to an add-on, not part of the checkout. This is the first I've heard of the parse error on create account. I'm interested in seeing it, since I'm not able to replicate it.


Unfortunately I am running the test store locally so can not show you the error happening. The store is vanilla with no mods done.

Styling is a matter of personal preference. Just change/add/remove classes and apply them as you see fit. Classes are in the <style> tags and the input fields are at the bottom of the page, with a little bit scrambled through the top 1/3 of the page ($action section).

A back button could be implemented, but honestly, it is what it is now, and unless it's a certifiable bug, I don't plan on changing anything else.


I have already started styling the fields.

Mark

Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)


#58   Tabula_Rasa

Tabula_Rasa
  • Members
  • 53 posts
  • Real Name:Sean Rice
  • Gender:Male
  • Location:Boston, MA

Posted 12 February 2012 - 16:53

I'm trying to merge OPC second version with UPSXML, USPS and Authorize.net. There isn't an emoticon ever created to express the frustration. lol!

I've followed OPC since PupStar's original post.

It doesn't seem like too unusual a configuration, so I was wondering if anybody has successfully gotten OPC to work with Authorize and UPS?

#59   oxwivi

oxwivi
  • Members
  • 251 posts
  • Real Name:Oxwivi Oxwil

Posted 12 February 2012 - 16:58

@Tabula_Rasa, this ain't OPC. This is completely new work written from scratch by the most honorable @fulluvscents, the OP of this thread.

#60   dog-toyz

dog-toyz
  • Members
  • 5 posts
  • Real Name:Andy

Posted 12 February 2012 - 17:08

@dog-toyz

The dialog boxes are in the following code:

Find:

$('#message').dialog(
  {
  shadow: true,
  modal: false,
  draggable: false,
  resizable: false,
  closeOnEscape: false,
  position: ['center', 50],
  width: 480,
  height: 75,
  open: function ()
   {
   $('.ui-dialog-titlebar', $(this).parent()).hide();
   setTimeout(function (){$('#message').dialog('close');$('#messagecontent').empty();}, 2000);
   }
	 });
$('#loader').dialog(
  {
  shadow: false,
  modal: true,
  draggable: false,
  resizable: false,
  closeOnEscape: false,
  position: ['center', 100],
  width: 75,
  height: 100,
  open: function ()
   {
   $('.ui-dialog-titlebar', $(this).parent()).hide();
   $(this).parent().addClass('nobord');
	  },
	 });
  $('#account').dialog(
  {
  shadow: true,
  draggable: false,
  resizable: false,
  closeOnEscape: false,
  width: 400,
  position: ['center', 100],
  open: function ()


$('#addresses').dialog(
{
shadow: false,
modal: true,
width: 400,
position: ['center', 100],
open: function ()

Under position: change the number 100 to move the placement of the boxes up or down.


Thanks for your reply, now I'm having trouble with the box when it expands as I need it to be inside another div so it expands with it.
Is there any way I can place the dialog boxes inside another div?

e.g.
<div class="contentContainer">
<div class="contentPadd">
DIALOG BOXES
</div>
</div>