Extending
Wp E-Commerce
Does What you’d
       expect
Product management
Does What you’d
        expect
Product management

Shipping Calculations
Does What you’d
        expect
Product management

Shipping Calculations

Tax Calculations
Does What you’d
        expect
Product management

Shipping Calculations

Tax Calculations

Coupons / Promotions
Does What you’d
        expect
Product management

Shipping Calculations

Tax Calculations

Coupons / Promotions

Payment ...
Gives you theming
     options
Full Product / Category List (products_page.php)
Gives you theming
     options
Full Product / Category List (products_page.php)

Single Product Page (single_product.php)
Gives you theming
     options
Full Product / Category List (products_page.php)

Single Product Page (single_product.php)
...
Gives you theming
     options
Full Product / Category List (products_page.php)

Single Product Page (single_product.php)
...
Gives you theming
     options
Full Product / Category List (products_page.php)

Single Product Page (single_product.php)
...
Extending
      WP e-Commerce
     the right way!
Keep WordPress and WP e-Commerce free from
modifications.

Make Plugins

...
Extending
       WP e-Commerce
     the right way?
Use Hooks - make Plugins and/or Upgrades

Utilize hooks available:
  ht...
More Than One Way
    ‘to skin a cat’
More Than One Way
    ‘to skin a cat’




 Hack the Plugin files
More Than One Way
    ‘to skin a cat’

                               Text



 Hack the Plugin files
 ---------------------...
More Than One Way
    ‘to skin a cat’




 Hack the Plugin files
 ---------------------------
 Make an Upgrade script
 Make...
More Than One Way
    ‘to skin a cat’




 Hack the Plugin files
 ---------------------------
 Make an Upgrade script
 Make...
Plugin
• Starts with a Plugin Header
Plugin
• Hooks into WP e-Commerce and WordPress via
 hooks




   http://getshopped.org/resources/hooks-and-filters/
Plugin
• Hooks into WP e-Commerce and WordPress via
  hooks

• Starts with a Plugin Header
• Lives in the Plugin Directory...
Plugin - examples
• The WPEC Plugin Skeleton
• WPEC-disable-dynamic-stylesheets
• Downloadables Importer
• jPlayerPlugin
Upgrade Modules
• Starts with an Upgrade header (just like Plugins only
  different)
Upgrade Modules
• Hooks into WP e-Commerce and WordPress via
 hooks




   http://getshopped.org/resources/hooks-and-filter...
Upgrade Modules
• Starts with an Upgrade header (just like Plugins only
  different)


• Hooks into WP e-Commerce and Word...
Upgrade Modules
       Examples
• Upgrades Skeleton
• No point showing you any other Upgrades all of
  them are being conv...
Theming
Default Location:
wp-content/plugins/wp-e-commerce/themes/

Safe Place Location:
WordPress: wp-content/uploads/wps...
Demonstration




Warning: Live Coding ahead,, which could
      potentially lead to screaming
Extending
       WP e-Commerce
      the right way!
Make Plugins

Make WPSC Themes

Talk to us!
Questions ?
http://instinct.co.nz
http:// getshopped.org
twitter: @getshopped
twitter: @danmilward

Resource Link: Link to Post .....
...
Extending WP-e-Commerce WordCamp UK
Upcoming SlideShare
Loading in...5
×

Extending WP-e-Commerce WordCamp UK

3,784

Published on

Manchester Presentation on WP-e-Commerce

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,784
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
35
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide
  • Hello
    Thank You Tony Scott and all the organizers and volunteers for putting together an amazing event!
    Who Am I?
    Name/From NZ
    1 1/2 yrs Plugin Development
    Learnt Lots, Learning more
    Work for Instinct and the GetShopped Crew
    Technical Support Person
    Maintain Plugin, release new versions
    Create additional Modules and Plugins to extend WPEC


  • WPEC is around 6-5 years old,
    downloaded over 500.000 times,
    FREE PLUGIN that transforms your blog into an online store,
  • Control
    1. (A means of managing your products )add/edit products & product categories

  • Control
    2. handles shipping methods (external/internal) UPS, FEDEX, USPS, flat rate, weight rate


  • 3. handles tax - currently working on a new tax system with full user control

  • Coupons, Promotions
    Specific Price or Percentage off price

  • 4. Pays You! handles gateways - paypal, google checkout, sagepay, chronopay, DPS +++

    So thats the Control is gives you, It also provides some theming options...>next slide
  • Standard Theming for the front end of your site,
    Display (mini-themes)
    WPEC comes with basic styling of the front end, display
    1. product-list
    A list of your products or category

  • 2. single-product
    Specific Page to show case a particular product
  • 3. checkout page
    A page used for calculating shipping and tax costs,
    and capturing billing and shipping details and sends request through to payment gateway
  • 4. transaction results and User Profiles
    Soon to be in a template of it’s own
  • Cart Widget,

  • How many people use wp-e-commerce personal or clients?
    How may of you are theme developers?
    How many of you are WordPress Developers or PHP Developers?

    What I mean Extending WP e-Commerce?
    What is the right way?


  • If you can’t do something using a hook or filter, then you should talk to us, maybe there is something we can do to help. We could:
    1. Add a filter / action
    2. Recommend a different approach
  • Upgrade scripts was the answer to extending WP e-Commerce for GetShopped for the past few years, however after conversations with WP developers, we have been advised that it does not follow WP best practices,, Ability to use Upgrades is still available, but if you are starting a new project I would recommend
  • Plugins, Follows along WP best practices, Only thing about Plugins is with the current WP-e-Commerce setup it is difficult to control when your Plugin will run, be it before or after WP e-Commerce, some say Plugins run alphabetically,, but we found this to be unreliable. We are working together with a few developers, and are getting advice from buddyPress core developers (who I believe have structured their Plugin in the best way in regards to extensibility)
  • If all you are planning on doing is customizing the esthetics then don’t worry about the Upgrade scripts and the Plugins,, make a WPEC custom theme.

    So there you have it. there is a few ways you can extend WP e-Commerce right now.

    The most exciting of all is Plugins. We are embracing Plugins in a big way,, My only tiff, with Extending through Plugins, is the fact it messes up the Plugins page,,, Unless the developer uses a naming convention that makes the Plugin noticeably an extension of WP e-Commerce then it becomes very difficult to tell whats what,, In my opinion it would be really cool if it worked in the same strain as Child Themes. but that’s just nit picking.
  • Pros:
    Developers are already familiar with Plugins
    Keeps WP e-Commerce Plugin free from modifications, allowing you to Upgrade worry free
    Keeps to WordPress best practices,

    Cons:
    Currently some filters, and actions are not included in the correct sequence, therefore some hooks and filters are not as reliable when used through a Plugin so should be done as an Upgrade instead. This is a known issue, we plan on rectifying in the 3.8 release. One such hook would be the `wpsc_gateway_modules` filter, as it is run on the main Plugin file,, :(
  • Pros:
    Developers are already familiar with Plugins
    Keeps WP e-Commerce Plugin free from modifications, allowing you to Upgrade worry free
    Keeps to WordPress best practices,

    Cons:
    Currently some filters, and actions are not included in the correct sequence, therefore some hooks and filters are not as reliable when used through a Plugin so should be done as an Upgrade instead. This is a known issue, we plan on rectifying in the 3.8 release. One such hook would be the `wpsc_gateway_modules` filter, as it is run on the main Plugin file,, :(
  • Pros:
    Developers are already familiar with Plugins
    Keeps WP e-Commerce Plugin free from modifications, allowing you to Upgrade worry free
    Keeps to WordPress best practices,

    Cons:
    Currently some filters, and actions are not included in the correct sequence, therefore some hooks and filters are not as reliable when used through a Plugin so should be done as an Upgrade instead. This is a known issue, we plan on rectifying in the 3.8 release. One such hook would be the `wpsc_gateway_modules` filter, as it is run on the main Plugin file,, :(
  • Open up Coda and Google Chrome
  • Pros:
    Files get included at the same time as the WP e-Commerce plugin
    No activation, works immediately
    Keeps WP e-Commerce Plugin free from modifications, allowing you to Upgrade worry free
    Keeps Plugin Page clean (with a whole lot of Plugins the Plugin Page can sometimes look a little over the top..)

    Cons:
    1. Permissions can be a pain, Some hosts have PHP running on a different group than your average FTP User, which means Users sometimes have to talk to their hosting provider about changing the groups / owners permissions for the uploads/wpsc/* folder tree. I've seen this happen a fair amount, and it is a right pain.
    2. Confusing for Users, more and more Users switching to WP e-Commerce are entirely clueless when it comes to servers, PHP, and file management. So having them FTP? and Copy Files? becomes frustrating for them,,
    3. WordPress says NO, Many WordPress developers have approached us and told us that this way of adding additional functionality is not quite best practice, and we should embrace Plugins.

  • Pros:
    Files get included at the same time as the WP e-Commerce plugin
    No activation, works immediately
    Keeps WP e-Commerce Plugin free from modifications, allowing you to Upgrade worry free
    Keeps Plugin Page clean (with a whole lot of Plugins the Plugin Page can sometimes look a little over the top..)

    Cons:
    1. Permissions can be a pain, Some hosts have PHP running on a different group than your average FTP User, which means Users sometimes have to talk to their hosting provider about changing the groups / owners permissions for the uploads/wpsc/* folder tree. I've seen this happen a fair amount, and it is a right pain.
    2. Confusing for Users, more and more Users switching to WP e-Commerce are entirely clueless when it comes to servers, PHP, and file management. So having them FTP? and Copy Files? becomes frustrating for them,,
    3. WordPress says NO, Many WordPress developers have approached us and told us that this way of adding additional functionality is not quite best practice, and we should embrace Plugins.

  • Pros:
    Files get included at the same time as the WP e-Commerce plugin
    No activation, works immediately
    Keeps WP e-Commerce Plugin free from modifications, allowing you to Upgrade worry free
    Keeps Plugin Page clean (with a whole lot of Plugins the Plugin Page can sometimes look a little over the top..)

    Cons:
    1. Permissions can be a pain, Some hosts have PHP running on a different group than your average FTP User, which means Users sometimes have to talk to their hosting provider about changing the groups / owners permissions for the uploads/wpsc/* folder tree. I've seen this happen a fair amount, and it is a right pain.
    2. Confusing for Users, more and more Users switching to WP e-Commerce are entirely clueless when it comes to servers, PHP, and file management. So having them FTP? and Copy Files? becomes frustrating for them,,
    3. WordPress says NO, Many WordPress developers have approached us and told us that this way of adding additional functionality is not quite best practice, and we should embrace Plugins.


  • same problem as Upgrades,
    Permissions are a pain.
    Confusing for Average User




  • Who am I?
    Jeffry Ghazally
    screamingcodemonkey.com
    Web Developer that has been using WordPress for about 2 years
    I work for getshopped.org
    Main Support Technician and Main Code Co-ordinator
  • Extending WP-e-Commerce WordCamp UK

    1. 1. Extending Wp E-Commerce
    2. 2. Does What you’d expect Product management
    3. 3. Does What you’d expect Product management Shipping Calculations
    4. 4. Does What you’d expect Product management Shipping Calculations Tax Calculations
    5. 5. Does What you’d expect Product management Shipping Calculations Tax Calculations Coupons / Promotions
    6. 6. Does What you’d expect Product management Shipping Calculations Tax Calculations Coupons / Promotions Payment Gateways
    7. 7. Gives you theming options Full Product / Category List (products_page.php)
    8. 8. Gives you theming options Full Product / Category List (products_page.php) Single Product Page (single_product.php)
    9. 9. Gives you theming options Full Product / Category List (products_page.php) Single Product Page (single_product.php) Checkout Page (shopping_cart_page.php)
    10. 10. Gives you theming options Full Product / Category List (products_page.php) Single Product Page (single_product.php) Checkout Page (shopping_cart_page.php) Transaction Results Page and User Profiles
    11. 11. Gives you theming options Full Product / Category List (products_page.php) Single Product Page (single_product.php) Checkout Page (shopping_cart_page.php) Transaction Results Page and User Profiles Cart Widget - (cart_widget.php)
    12. 12. Extending WP e-Commerce the right way! Keep WordPress and WP e-Commerce free from modifications. Make Plugins Submit code for contribution / review http://getshopped.org/forums http://code.google.com/p/wp-e-commerce/
    13. 13. Extending WP e-Commerce the right way? Use Hooks - make Plugins and/or Upgrades Utilize hooks available: http://getshopped.org/resources/hooks-and-filters/ Currently there are limitations, but we are quickly over coming them. Talk to us!
    14. 14. More Than One Way ‘to skin a cat’
    15. 15. More Than One Way ‘to skin a cat’ Hack the Plugin files
    16. 16. More Than One Way ‘to skin a cat’ Text Hack the Plugin files --------------------------- Make an Upgrade script
    17. 17. More Than One Way ‘to skin a cat’ Hack the Plugin files --------------------------- Make an Upgrade script Make a Plugin
    18. 18. More Than One Way ‘to skin a cat’ Hack the Plugin files --------------------------- Make an Upgrade script Make a Plugin Make your own custom theme
    19. 19. Plugin • Starts with a Plugin Header
    20. 20. Plugin • Hooks into WP e-Commerce and WordPress via hooks http://getshopped.org/resources/hooks-and-filters/
    21. 21. Plugin • Hooks into WP e-Commerce and WordPress via hooks • Starts with a Plugin Header • Lives in the Plugin Directory • Needs to be Activated from the Plugins Page
    22. 22. Plugin - examples • The WPEC Plugin Skeleton • WPEC-disable-dynamic-stylesheets • Downloadables Importer • jPlayerPlugin
    23. 23. Upgrade Modules • Starts with an Upgrade header (just like Plugins only different)
    24. 24. Upgrade Modules • Hooks into WP e-Commerce and WordPress via hooks http://getshopped.org/resources/hooks-and-filters/
    25. 25. Upgrade Modules • Starts with an Upgrade header (just like Plugins only different) • Hooks into WP e-Commerce and WordPress via hooks • Code is placed in: • WordPress : `wp-content/uploads/wpsc/upgrades/` • MS : `wp-content/blogs.dir/blog_ID/files/wpsc/upgrades/`
    26. 26. Upgrade Modules Examples • Upgrades Skeleton • No point showing you any other Upgrades all of them are being converted into Plugins
    27. 27. Theming Default Location: wp-content/plugins/wp-e-commerce/themes/ Safe Place Location: WordPress: wp-content/uploads/wpsc/themes/ MS: wp-content/blogs.dir/blog_ID/files/wpsc/themes/ 3.8 is moving to WordPress Themes - Even Better!
    28. 28. Demonstration Warning: Live Coding ahead,, which could potentially lead to screaming
    29. 29. Extending WP e-Commerce the right way! Make Plugins Make WPSC Themes Talk to us!
    30. 30. Questions ?
    31. 31. http://instinct.co.nz http:// getshopped.org twitter: @getshopped twitter: @danmilward Resource Link: Link to Post ..... email : jeff@instinct.co.nz twitter : @jghazally blog: screamingcodemonkey.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×