make me a sandwich, tienda

23
Make me a sandwich, Tienda! Lukas Polak, Dioscouri Design c

Upload: polakluk

Post on 05-Aug-2015

489 views

Category:

Technology


0 download

TRANSCRIPT

Make me a sandwich, Tienda!Lukas Polak, Dioscouri Design

c

Who am I?

• Leading developer of Tienda e-commerce in Dioscouri Design

• Participant of J!SOP 2010

• Student at CTU Faculty of Information Technology in Prague

• Passionate about Joomla for 5 years

"Tell me what you eat, and I will tell you what you are.“ Brillat-Savarin

What am I going to talk about?

• Brief description of Tienda & plugins

• 3 simple rules to follow when working with plugins

• “layout” modifications

• Adding new features

• Inserting new steps into

business logic

“Ladies & gentlemen, please fasten your seatbelts. We are about to start, ” captain said

Source codes

• All extensions shown during this presentation will be published for free afterwards

• http://projects.dioscouri.com/svn/tienda/branches/jab11/

• Installation package of Joomla! 1.5.26 + Tienda which is used during this session will be provided in JPA format generated by extension Akeeba Backup v. 3.4.3. (www.akeebabackup.com)

• admin/pass

• All demo extensions are simplified• Demo #2 uses jQuery library• Rest demos require MooTools Upgrade plugin

Plugin

• Small & witty piece of code

• Change or extend behavior • Events

• No support for layout overrides• Can by added

Observer vs. mediator pattern

• Observer• Notify about change in state

• Mediator• Extend their business logic

Tienda

• Basic package

• 18 modules, 29 plugins, 6 payment plugins, 4 shipping

plugins

• Joomla! 2.5 ready Languages

• One-page Checkout (OPC) in the basic package

• Number of events 400+ (last JAB) vs. 470+ (today)

• For more information visit

http://dioscouri.com/joomla-extensions/tienda-eco

mmerce

Lego v2.0

• Ask “what would the customer want to do with our extension”

• Do not over think usage of events

• Think outside of the box

Ask “what would the customer want to do with our extension”

• Do you really need this to be so flexible?

• Consider opportunity cost

• Being too flexible is NOT a good thing

• Always bigger room for bugs

Do not over think usage of events

- Cannot we already do this using another approach?- Do not bend rules too much – causes problems in future

- Will anybody use it?- Better to wait until somebody asks for it

Think outside of the box

• List through names of all events

• Did not find one that rings a bell or seemed helpful

• Plugins are not an ultimate tool for everything

• Combination of plugins & layout overrides

Rule #1 - Demo #1 – “Shoes size chart”

• Insert a shoes size chart into product view of every shoes in the shop

• Pick the right place• Improvements

• Filter Product Layouts• Filter Categories• Custom Width

“Your customer is your boss”

Rule #1 - Demo #1 – “Shoes size chart”“Your customer is your boss”

Rule #1 - Demo #2 – “Cool gallery”

• Images in product gallery varies based on chosen product

attributes

• Use AJAX

• onPrepareGalleryImages( &$Images )

• Chaining effect

• Use jQuery event handler .on()

• $jq( '.product_buy' ).on( 'change', '#attribute_'+

plgDemo2.attr_id , function() {});

“Your customer is your boss”

Rule #1 - Demo #2 – “Cool gallery”“Your customer is your boss”

Rule #2 - Demo #3 – “Custom” field

• List of flags• Let user to pick one

• Use hidden input field• Added to Tienda EAV for this purpose

• onPrepareProducts & onPrepareProductsList• Make sure that the product will not save data!

• Improvements• Different set of flags• Multiple selection• Make it more customizable• Tie it up with gallery plugin (demo #2)

Rule #2 - Demo #3 – “Custom” field

Rule #3 – Demo #4 – Every n-th order for free

• Gives customer discount during checkout• Based on specified criteria

• Great marketing move• Code once, works everywhere

• OPC, std checkout, POS• Improvements

• Only x% discount• On n-th order in row from the same user• Shipping discount

“One rule to rule them all”

Rule #3 – Demo #5 – Conduct a survey

• Ask user a question before making payment• Voluntary survey

• Pick a correct place to put the survey• onBefore(After)DisplaySelectShipping ($order)• onValidateSelectPayment($values)• onAfterStoreOrders($order)

• Checkout process may depend on its results• Check for age of the customer

• Improvements• Offer a discount – quiz• Multiple-choice questions• Time deadline

“One rule to rule them all”

Rule #3 – Demo #5 – Conduct a survey“One rule to rule them all”

Big finale – Demo #6 – One click to buy

• Add to cart and complete checkout process in one click• Uses data from logged user (default billing & shipping addresses)

• Amazon uses this feature• People tend to spend more money thanks to it

• Making use of checkout controller method• Ensures better

• Improvements• Enables admin to control what payment plugins

are used• Letting user to choose shipping method

“The sooner, the better. It was too late yesterday!”

Big finale – Demo #6 – One click to buy“The sooner, the better. It was too late yesterday!”

THANK YOU FOR YOUR ATTENTION!Questions?

[email protected]: @_elf