Jump to content


[Snippet] etoBasket for paypal


18 replies to this topic

#16 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 25 October 2007 - 08:27 PM

View PostCris D., on Oct 25 2007, 05:23 PM, said:

I'll have a into it over the weekend.
No rush, it's just a suggestion for improvement :)

#17 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 26 October 2007 - 10:57 PM

Snippet updated with a "View Cart" link above the first item and below the last item on the page. This can be configured in the snippet to use text "View Cart" or an <img src='buttons/view_cart" /> image.

I also changed the form action from' _blank' to 'paypal' to stop numerous carts opening up.

Because Paypal generates the cart in this use, I have not created a "Proceed to Checkout" button as this would require integration of paypal API's and can be quite complex.

This use keeps the majority of processing power on the paypal servers and reduces client's need to go into the more complicated tasks of tracking shoppers with tokens and implementing a payment flow that toggles between paypal and the Etomite site.

I wanted to also stress that this snippet can have MANY more form fields added to configure the cart so that it is stryled closely to the Etomite site. Have a look here for all the additional fields that can be added for customising the display of the cart.

#18 Wiper2007

    Etomite Forum Fan

  • Member
  • Pip
  • 76 posts

Posted 18 January 2010 - 05:44 PM

Hi

I've downloaded etobasket snippet - but getting the error :

Execution of a query to the database failed » SQL: SHOW TABLE STATUS LIKE 'etomite_etobasket'
I'm missing the create table script... or are the etobasket snippet supposed to create the nessasary tables ?

Edited by Ralph, 19 January 2010 - 02:16 PM.
Moved topic/post to proper location.


#19 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 22 January 2010 - 10:37 AM

View PostWiper2007, on 18 January 2010 - 05:44 PM, said:

Hi

I've downloaded etobasket snippet - but getting the error :

Execution of a query to the database failed » SQL: SHOW TABLE STATUS LIKE 'etomite_etobasket'
I'm missing the create table script... or are the etobasket snippet supposed to create the nessasary tables ?
This is often an error with the intTableExists and extTableExists implementation. The snippet is supposed to make the table for you. You can work around that by creating the table manually, runnning some sql code to create is programatically or improving the test for whether the table exists... There is the same problem in this thread below...

Try creating the table required for this by running this code as a snippet:
$tableName ="etobasket";//set this to the same tablename as in your snippet
$etoPrefix="etomite";//set this to the etomite installation prefix
$sql = 'CREATE TABLE `'.$etoPrefix.$tableName.'` ('
 			. ' `id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, '
 			. ' `item` VARCHAR(100) NULL, '
 			. ' `description` VARCHAR(500) NULL, '
 			. ' `price` VARCHAR(10) NULL, '
 			. ' `pic_folder` VARCHAR(50) NULL, '
 			. ' `filename` VARCHAR(20) NULL, '
 			. ' `onPage` INT( 10 ) NULL, '
 			. ' `active` ENUM(\'1\',\'0\') NOT NULL DEFAULT \'1\''
 			. ' )'
 			. ' ENGINE = myisam;';
			$created = $etomite->dbQuery($sql);
			
if($created){

return "Table created. Please remove this snippet and run etoBasket snippet.";
}else{
return "There is a server configuration error, please check your server permissions";

}

If that does not work, you can have a look at using the intTableExists API (which is the preferable method anyway).

Failing that, just create the table required using phpMyAdmin - one column at a time - use the sql as a guide.

Edited by Cris D., 22 January 2010 - 09:17 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users