# |
Jun 29th 2017, 08:05 |
manuweg |
products are just a model within the the shop plugin |
# |
Jun 29th 2017, 08:05 |
admad |
nvm, i see 'className' has the Shop prefix |
# |
Jun 29th 2017, 08:04 |
manuweg |
Shop is the plugin |
# |
Jun 29th 2017, 08:04 |
admad |
*your |
# |
Jun 29th 2017, 08:04 |
admad |
manuweg: are you Products and Shops also in the Shop plugin? If you in associations you need to use Shop.Prouducts and Shop.Shops |
# |
Jun 29th 2017, 07:38 |
manuweg |
thanks for the input |
# |
Jun 29th 2017, 07:38 |
manuweg |
no worries |
# |
Jun 29th 2017, 07:38 |
manuweg |
OK |
# |
Jun 29th 2017, 07:37 |
savant |
yeah i think so |
# |
Jun 29th 2017, 07:35 |
manuweg |
so I'm thinking maybe it's just a bug in the cake bake code relating to unconventional model names |
# |
Jun 29th 2017, 07:35 |
manuweg |
because the controller baked correctly |
# |
Jun 29th 2017, 07:34 |
manuweg |
yes that's what I thought |
# |
Jun 29th 2017, 07:34 |
savant |
which has the correct table specified… |
# |
Jun 29th 2017, 07:34 |
savant |
that *should* just use the table class in your Shop plugin |
# |
Jun 29th 2017, 07:34 |
savant |
interesting |
# |
Jun 29th 2017, 07:34 |
manuweg |
but I'm sure there is a cleaner way of doing it |
# |
Jun 29th 2017, 07:33 |
manuweg |
and then change the folder names and variable names |
# |
Jun 29th 2017, 07:33 |
manuweg |
I could just generate the code for the cake convention templates eg. ShopOrderItems |
# |
Jun 29th 2017, 07:32 |
manuweg |
when I generated the shop categories templates it generated the templates for the other categories model that I have which is not prefixed |
# |
Jun 29th 2017, 07:29 |
manuweg |
https://gist.github.com/manuweg/4e94e477db68df19d71c3a82d21e288b |
# |
Jun 29th 2017, 07:28 |
manuweg |
shall I just post the gist url? |
# |
Jun 29th 2017, 07:28 |
manuweg |
how do I share it? |
# |
Jun 29th 2017, 07:26 |
manuweg |
thanks for your help! |
# |
Jun 29th 2017, 07:26 |
adriencs |
o/ |
# |
Jun 29th 2017, 07:26 |
manuweg |
give me a sec |
# |
Jun 29th 2017, 07:26 |
manuweg |
ok |
# |
Jun 29th 2017, 07:26 |
slackebot |
~tell manuweg about gist |
# |
Jun 29th 2017, 07:26 |
slackebot |
Command sent from Slack by savant: |
# |
Jun 29th 2017, 07:26 |
savant |
can you gist your table class? |
# |
Jun 29th 2017, 07:25 |
manuweg |
2017-06-29 07:07:02 Error: [Cake\Database\Exception] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cttpcake.order_items' doesn't exist in /Users/wegmershaus/Dropbox/Websites/public_html/cttpcake/vendor/cakephp/cakephp/src/Database/Schema/Collection.php on line 131 |
# |
Jun 29th 2017, 07:25 |
manuweg |
Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cttpcake.order_items' doesn't exist in [/Users/wegmershaus/Dropbox/Websites/public_html/cttpcake/vendor/cakephp/cakephp/src/Database/Schema/Collection.php, line 131] |
# |
Jun 29th 2017, 07:25 |
manuweg |
error |
# |
Jun 29th 2017, 07:25 |
manuweg |
bin/cake bake template --plugin Shop --theme NiceAdminBakeTheme OrderItems |
# |
Jun 29th 2017, 07:25 |
manuweg |
command |
# |
Jun 29th 2017, 07:25 |
manuweg |
I get an error let me paste it hang on |
# |
Jun 29th 2017, 07:24 |
savant |
they should pick up your table class properly |
# |
Jun 29th 2017, 07:24 |
savant |
just bake the templates as normal |
# |
Jun 29th 2017, 07:24 |
manuweg |
I have baked the models and controllers successfully |
# |
Jun 29th 2017, 07:23 |
manuweg |
I just want to know how to bake templates for a model where the table name has been set because I use a table prefix |
# |
Jun 29th 2017, 07:23 |
manuweg |
cool! |
# |
Jun 29th 2017, 07:23 |
admad |
this is the right place for all questions related to cakephp :slightly_smiling_face: |