Etomite Community Forums: [Snippet] etoBasket for paypal - Etomite Community Forums

Jump to content

Read Me

This forum is posted in automatically when a snippet is added to the library, or updated. Please use the snippet topic to discuss that snippet.
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

[Snippet] etoBasket for paypal

#16 User is offline   cathode 

  • Etomite Staff
  • Group: Staff
  • Posts: 654
  • Joined: 21-November 05
  • Location:Indiana, U.S.

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 User is offline   Cris D. 

  • Loves Etomite Forums!
  • PipPipPipPip
  • Group: Member
  • Posts: 1,076
  • Joined: 10-August 06
  • Gender:Not Telling

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 User is offline   Wiper2007 

  • Etomite Forum Fan
  • Pip
  • Group: Member
  • Posts: 76
  • Joined: 06-March 07

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 ?

This post has been edited by Ralph: 19 January 2010 - 02:16 PM
Reason for edit: Moved topic/post to proper location.


#19 User is offline   Cris D. 

  • Loves Etomite Forums!
  • PipPipPipPip
  • Group: Member
  • Posts: 1,076
  • Joined: 10-August 06
  • Gender:Not Telling

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.

This post has been edited by Cris D.: 22 January 2010 - 09:17 PM


Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users