How to turn your PayPal Website Payments Button into an "Add to Cart" button for use with PayPal's Shopping Cart.<div><p><span class="emphasis">Before you begin:</span>
Unlike a PayPal Website Payments button, where all fields are optional, the PayPal Shopping Cart requires the item_name and amount fields. If you did not use either of these fields when you created your PayPal Website Payments button, please create new buttons via the PayPal Button Factory.
The current HTML code for your PayPal Website Payments button should look similar to this:
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular "><form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="payments@yoursite.com">
<input type="hidden" name="item_name" value="Baseball Hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="5.95">
<input type="hidden" name="shipping" value="1.00">
<input type="hidden" name="shipping2" value="0.50">
<input type="hidden" name="handling" value="2.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm">
<input type="hidden" name="undefined_quantity" value="1">
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" width="68" height="23" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
</td></tr></tbody></table><p>
To transform the PayPal Website Payments code above into an 'Add to Cart' button:
<span class="emphasis">1. </span>Copy your Buy Now Buttons code from your website into a text editor.
<span class="emphasis">2. </span>Add target="paypal" to the </p><form> tag:
<p></p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular ">target="paypal"></td></tr></tbody></table><p>
<span class="emphasis">3. </span>Find this line in your code:
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular "><input type="hidden" name="cmd" value="_xclick"></td></tr></tbody></table><p>
<span class="emphasis">4. </span>Replace "_xclick" with "_cart":
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular "><input type="hidden" name="cmd" span="" class="emphasis">value="_cart"></td></tr></tbody></table><p>
<span class="emphasis">5. </span>Add the following line somewhere between the tags:
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular "><input type="hidden" name="add" value="1"></td></tr></tbody></table><p>
<span class="emphasis">6. </span>Find the "input type=image" line in your code:
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular "><input type="image" src="http://www.paypalobjects.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" width="68" height="23" alt="Make payments with PayPal - it's fast, free and secure!"></td></tr></tbody></table><p>
<span class="emphasis">7. </span>Replace the "input type=image" line with:
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular "><input type="image" src="http://www.paypalobjects.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it's fast, free and secure!"></td></tr></tbody></table><p>
<span class="emphasis">8. </span>Your code should now look similar to the code below:
</p><table class="tableDarkGreyBorder " align="center" cellpadding="5" width="500"><tbody><tr class="codeSample "><td class="tableCellRegular ">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="payments@yoursite.com">
<input type="hidden" name="item_name" value="Baseball Hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="5.95">
<input type="hidden" name="shipping" value="1.00">
<input type="hidden" name="shipping2" value="0.50">
<input type="hidden" name="handling" value="2.00 ">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm">
<input type="hidden" name="undefined_quantity" value="1">
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it's fast, free and secure!">
</td></tr></tbody></table><p>
<span class="emphasis">9. </span>Remove the original PayPal Website Payments HTML code and paste the code you just created into your website's HTML code. A PayPal 'Add To Cart' button will appear on your website instead of your original Single Item Purchase button.
<span class="emphasis">10. </span>To complete your implementation of the PayPal Shopping Cart, you will still need to add a 'View Cart' button to your website.</p></form></div>
PHP Master
Tuesday, July 12, 2011
Sunday, June 26, 2011
Data flow diagram
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information system, modelling its process aspects.
DFD for university routine management project
Description of 1st level:
DFD is top-down designing approach in which
(a)A high-level function is decomposed into a set of easy understandable function.
(b)Each function performed by system is analyzed and decomposed into more detailed description.
A DFD models a system by using external entities from which data flows to a process which transform the data and creates output data flow which go to other processes or external entities or data stores . From data stores, stored data may also flow to process as inputs.Dfd with example
Here External entity 1 gives input data to process1 after this processed data 1 is stored in data store , now stored data is given to process 2 and finally processed data 2 is consumed by External entity 2.
Physical DFD to issue a book from library:-
Logical DFD to issue a book from library(above)
DFD for university routine management project
zero level DFD for university routine management project.
generation on available resources like programmes, courses, subjects, teachers, lecture room/lab preferences. Assignments/lecture notes upload , Daily class attendance, student feedback, exams marks updation and students/faculty profile management would be the integral part of this system.User of the System:
A. End-user/students
B. Data Manager
C. Subject Teacher
D. Admin/Dean/Director
first and second level DFD of university management
Description for zero level DFD
- As stated in the question there are 4 users in the project.
- Here detailed informations regarding each student and teacher are given and in response every student has got SIN(student identification num) or Roll No. and for teacher it is TIN(teacher identification num).
- Database Manager will perform all the data entry job.
- After giving routine generating command a routne will be generated.
- Admin can veiw the every user , his peformance and get the result by giving the query. first level DFD of university management:
every student , every teacher , evey class room and every subject should be registerd
Saturday, June 25, 2011
Typical CakePHP Request
I am covered the basic ingredients in CakePHP, so let’s look at how objects work together to complete a basic request. Continuing with our original request example, let’s imagine that our friend Ricardo just clicked on the “Buy A Custom Cake Now!” link on a CakePHP application’s landing page.
Black = required element, Gray = optional element, Blue = callback
- Ricardo clicks the link pointing to http://www.example.com/cakes/buy, and his browser makes a request to your web server.
- The Router parses the URL in order to extract the parameters for this request: the controller, action, and any other arguments that will affect the business logic during this request.
- Using routes, a request URL is mapped to a controller action (a method in a specific controller class). In this case, it’s the buy() method of the CakesController. The controller’s beforeFilter() callback is called before any controller action logic is executed.
- The controller may use models to gain access to the application’s data. In this example, the controller uses a model to fetch Ricardo’s last purchases from the database. Any applicable model callbacks, behaviors, and DataSources may apply during this operation. While model usage is not required, all CakePHP controllers initially require at least one model.
- After the model has retrieved the data, it is returned to the controller. Model callbacks may apply.
- The controller may use components to further refine the data or perform other operations (session manipulation, authentication, or sending emails, for example).
- Once the controller has used models and components to prepare the data sufficiently, that data is handed to the view using the controller’s set() method. Controller callbacks may be applied before the data is sent. The view logic is performed, which may include the use of elements and/or helpers. By default, the view is rendered inside of a layout.
- Additional controller callbacks (like afterFilter) may be applied. The complete, rendered view code is sent to Ricardo’s browser.
Wednesday, June 22, 2011
MVC Architecture
- The Model represents the application data
- The View renders a presentation of model data
- The Controller handles and routes requests made by the client
Subscribe to:
Posts (Atom)