Jump to content

Migrating to ProcessWire Commerce from Padloper


Recommended Posts

NOTE: Here and elsewhere referencing ProcessWire Commerce, Padloper refers to Padloper 2. Padloper 1 was retired 3 years ago. 

--------------

New Site

  • Install ProcessWire Commerce.
  • The current (outdated and incomplete!) Padloper docs are still helpful. Note though that configuring ProcessWire Commerce is accessed via /admin/shop/configure-pwcommerce/.
  • For template  files and hooks, please note the following:

Changes

Template Files

All instances of $padloper should be replaced by $pwcommerce. For instance $padloper->getCart() should become $pwcommerce->getCart()

All instances of 'pad_' should be replaced by 'pwcommerce_'. For instance 'pad_price_total' should become 'pwcommerce_price_total'.

Hooks

Your hooks, e.g. in ready.php should be renamed as follows: 

All instances of Padloper::someHookedMethod should become PwCommerce::someHookedMethod. Please note the spelling is case-sensitive.

Existing Site

  • DO NOT UNINSTALL Padloper!
  • DO NOT INSTALL ProcessWire Commerce!
  • Download and install the Padloper to ProcessWire Commerce migration tool from this repo.
  • Please READ all the instructions!
  • Template Files: As above.
  • Hooks: As above.

Any issues please let us know below. Include info about:

  • ProcessWire version (please note ProcessWire Commerce/Padloper's admin GUI is broken in new admin theme,  i.e., ProcessWire 3.0.248 (or newer).
  • Padloper version.
  • Site language(s).
  • PHP version.
  • MySQL version.

For issues with the migration tool itself, please raise an issue in the project repo. Include the above environment information please.

 

Whilst I have thoroughly tested the migration tool (on a multilingual site), usage of the migration tool is at your own risk! 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Just tried to upgrade my very old Padloper installation. I get this error when the `ProcessWireCommerce` folder i in the `modules` folder and I hit Modules > Refresh.

Warning: require(ProcessWire/PaymentPaypal.php): Failed to open stream: No such file or directory in /yadayada/site/modules/ProcessWireCommerce/vendor/autoload.php on line 49

Well well… Fatal Error: Uncaught Error: Failed opening required 'ProcessWire/PaymentPaypal.php' (include_path='.:/Applications/MAMP/bin/php/php8.3.14/lib/php') in site/modules/ProcessWireCommerce/vendor/autoload.php:49

#0 [internal function]: ProcessWireCommerce\autoload_paypal_stripe('\Pay...')
#1 wire/core/ModulesFiles.php (271): ReflectionClass->__construct('\\\Pa...')
#2 wire/core/Modules.php (2276): ModulesFiles->getModuleFile('PaymentPaypal', Array)
#3 wire/core/ModulesInfo.php (1128): Modules->getModuleFile('PaymentPaypal', Array)
#4 wire/core/Modules.php (1953): ModulesInfo->clearModuleInfoCache(true)
#5 wire/core/Wire.php (416): Modules->___refresh(true)
#6 wire/core/WireHooks.php (998): Wire->_callMethod('___refresh', Array)
#7 wire/core/Wire.php (484): WireHooks->runHooks(Object(Modules), 'refresh', Array)
#8 wire/modules/Process/ProcessModule/ProcessModule.module (389): Wire->__call('refresh', Array)
#9 wire/core/Wire.php (413): ProcessModule->___execute()
#10 wire/core/WireHooks.php (998): Wire->_callMethod('___execute', Array)
#11 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessModule), 'execute', Array)
#12 wire/core/ProcessController.php (361): Wire->__call('execute', Array)
#13 wire/core/Wire.php (413): ProcessController->___execute()
#14 wire/core/WireHooks.php (998): Wire->_callMethod('___execute', Array)
#15 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessController), 'execute', Array)
#16 wire/core/admin.php (174): Wire->__call('execute', Array)
#17 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/Users/claus/Gi...')
#18 site/templates/admin.php (15): require('/Users/claus/Gi...')
#19 wire/core/TemplateFile.php (328): require('/Users/claus/Gi...')
#20 wire/core/Wire.php (413): TemplateFile->___render()
#21 wire/core/WireHooks.php (998): Wire->_callMethod('___render', Array)
#22 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array)
#23 wire/modules/PageRender.module (581): Wire->__call('render', Array)
#24 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent))
#25 wire/core/WireHooks.php (998): Wire->_callMethod('___renderPage', Array)
#26 wire/core/Wire.php (484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array)
#27 wire/core/WireHooks.php (1099): Wire->__call('renderPage', Array)
#28 wire/core/Wire.php (484): WireHooks->runHooks(Object(Page), 'render', Array)
#29 wire/modules/Process/ProcessPageView.module (193): Wire->__call('render', Array)
#30 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest))
#31 wire/core/Wire.php (416): ProcessPageView->___execute(true)
#32 wire/core/WireHooks.php (998): Wire->_callMethod('___execute', Array)
#33 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array)
#34 index.php (55): Wire->__call('execute', Array)
#35 {main}
thrown (line 49 of site/modules/ProcessWireCommerce/vendor/autoload.php)

This error message was shown because: you are logged in as a Superuser. Error has been logged.

 

Link to comment
Share on other sites

On 6/24/2025 at 3:17 PM, Claus said:

I get this error when the `ProcessWireCommerce` folder i in the `modules` folder and I hit Modules > Refresh.

Hi @Claus,

Thanks for reporting. I am a bit perplexed by this one. Are you on a Mac? At first, I was wondering if it's a paths (directory separator) issue. But then...

 

On 6/24/2025 at 3:17 PM, Claus said:
#3 wire/core/ModulesInfo.php (1128): Modules->getModuleFile('PaymentPaypal', Array)

this is confusing. Padloper (nor ProcessWire Commerce) does not have a module called PaymentPaypal. Which leads me to...

 

On 6/24/2025 at 3:17 PM, Claus said:

my very old Padloper installation

How old are we talking? 😀

Link to comment
Share on other sites

Oh it’s mega old – 2017. The site was never deployed, but I’m back to working on it and saw that you open sourced PWC and I thought I might give that a go. Can I instead manually remove Padloper and start from scratch with PWC? That would make me feel better knowing that I don’t have some old Padloper stuff laying around.

These are the PayPal files I have in the `includes` dir.

image.thumb.png.3c62231c50eaa5f29d267a48e6bc40cc.png

Link to comment
Share on other sites

18 minutes ago, Claus said:

Oh it’s mega old – 2017.

You had Padloper v1, the Migration is for Padloper v2.

I think it is better to start from the scratch. 

@kongondo Please update the title, I also thought I could migrate my old Padloper v1 store to PWCommerce.

  • Like 1
Link to comment
Share on other sites

What do I need to delete and remove if I want to remove Padloper and its data entirely? I’m thinking the module and the fields? The templates I suppose I can update?

With the help of Claude I managed to get Padloper 1.3.1 uninstalled. It was a bit involved, but I got there in the end. I’ll try my luck in installing PWC now.

Edited by Claus
Got it sorted.
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...