Open echantigny opened 5 years ago
The plugin generator doesn't register any of this correctly. I spent all day debugging my way through it and finally got it.
Event::on
with Plugins::EVENT_REGISTER_CP_URL_RULES
, and change the $event->rules['siteActionTrigger1']
to $event->rules['YOUR-PLUGIN-HANDLE']
, where "YOUR-PLUGIN-HANDLE" is commerce-wishlist in this case.['template' => 'commerce-wishlist/commerce-wishlist']
(or commerce-wishlist/index
if you didn't set a name for the CP section in the generator config).{% do view.registerAssetBundle("fostercommerce\\inventory\\assetbundles\\inventory\\InventoryAsset") %}
on or around line 19. The file doesn't exist and will cause an error.extraPageHeaderHtml
isn't a variable in the actual _layouts/cp
template that this one extends. Change it to {% block actionButton %}
, and then the following {% endset %}
to {% endblock %}
of course.Hope this helps!
After installing my base plugin, I was expecting to be able to click the CP section and it would just work. Unfortunately, I was given an error:
Template not found: commerce-wishlist
.I did not change the name of any files. The only thing I did prior to installing it is to set the table fields I wanted for my plugin, which worked.