WordPress.org

Ready to get started?Download WordPress

Forums

WPPizza
[resolved] change back end WP Pizza name? (37 posts)

  1. nostahl
    Member
    Posted 10 months ago #

    hello, where would I go to change the WP PIZZA name on the back end order history screen. since we are not delivering pizza i'd like to change it to avoid confusion :)

    http://wordpress.org/plugins/wppizza/

  2. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    in wppizza.php you can change

    define('WPPIZZA_NAME', 'WPPizza');

    to

    define('WPPIZZA_NAME', 'Whatever You Want');

    However, this will not be persistent when you update the plugin.
    i.e you either loose the ability to update or you will have to do the changes everytime the plugin gets updated

    (although I might add a way to do this without the loss of updatability in one of the next updates, no promises though)

  3. nostahl
    Member
    Posted 10 months ago #

    sounds great TY ollybach

  4. nostahl
    Member
    Posted 10 months ago #

    hmm, i did that and refreshed the page and it prompted me saying it installed wppizza and now I cant see any of the shop settings, just the menu page shows in the admin area.

  5. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    ehem, what exactly did you do then ? (this behaviour just makes no sense)

  6. nostahl
    Member
    Posted 10 months ago #

    I just went into wppizza.php and changed the name and saved and refreshed the page, it was on the dashboard of a multisite sub site and it looked like it installed the plugin again.

    i checked the db and there is options for wppizza and for the new name I set. but its not displaying any plugin settings or anything now... hmm. shall I rename it back to wppizza and remove the db table for the new name and the options for the new name and see if it realizes the existing wppizza original options?

  7. nostahl
    Member
    Posted 10 months ago #

    I'm still having no luck, now the front end is showing the short codes instead of menu and such. everything got borked some how.

  8. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    ah , i did not realize you were on a multisite install (although why that should make any difference i dont know)

    however, if you just did a new site on a multisite, it WILL say - thank you for installing etc. as it - well - just installed it

  9. nostahl
    Member
    Posted 10 months ago #

    I had refreshed the page on the store after I did the name change and thats when it re-installed the plugin with the new prefix in the name apparently. the wppizza tables are still visible in the database but I (backed up first) removed the new tables it created but its still not back to what it was...hmm

  10. nostahl
    Member
    Posted 10 months ago #

    so to answer your question, it did this on a multisite - site that already had wppizza running with products and ingredients etc.

  11. nostahl
    Member
    Posted 10 months ago #

    all the tables and wp_options look fine. not sure why it is not showing me it has got to be some sort of access restrictions bug?

  12. nostahl
    Member
    Posted 10 months ago #

    I tried typing in manually adding wp-admin/edit.php?post_type=wppizza to the end of my url and it says i do not have sufficient permissions to view this page.

  13. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    i overlooked one thing when i suggested the above

    if you do that namechange also hardcode

    $this->WP_Widget(false, $name=$this->pluginName, $widget_opts);

    to

    $this->WP_Widget(false, $name='WPPizza', $widget_opts);

  14. nostahl
    Member
    Posted 10 months ago #

    ok

  15. nostahl
    Member
    Posted 10 months ago #

    what does that do?

  16. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    the plugin extends WP_Widget

    and has a name (which is WPPizza strangley enough)

    if you change the defined name, it changes also the widget name, whence your problems......

    so after all it's probably not such a good idea to hack around in the plugin and set some random variables without really testing it..hope you have a backup .......

    (again, i may do an option to change the name in one of the next updates, but it clearly needs some more careful consideration...read testing.)

  17. nostahl
    Member
    Posted 10 months ago #

    hmm :P what can I hack around in the db to get things back? this is a great learning experience before the shop goes live lol

  18. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    > this is a great learning experience..

    as in MAKE BACKUPS ? :p

    anyway, have you set the coding back to what it was in the first place ?

  19. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    in fact, my second suggestion - hardcoding the widget line - doesn't really make any difference and is in fact a rather irrelevant idea on second thoughts.

    i actually just changed that "define" line on one of my local installs ad its just fine.

    have you look under "access rights" to ensure the relevant user has - well - access to the pages ?

  20. nostahl
    Member
    Posted 10 months ago #

    I did reset everything back to what it was before.

    it is only showing me all menu items and add new but none of the other plugin admin pages..

    how can I check the access rights from phpmyadmin for administrator user.

  21. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    admittedly , i have not tested that access rights thing thoroughly in multisite installs

    all in all (athough without any guarantees at this stage) changing just

    define('WPPIZZA_NAME', 'WPPizza');

    as mentioned above should work fine. If you are loosing access to pages ,its probably got something to do with the access rights

    furthermore, i do not think that your DB was messed up by what we did above (with or without the 'WP_Widget' change )

    i just think your access rights are wrong, which you should be able to rectify by ticking some boxes

    (again, no guarantees at the moment as it has not been tested or fully verified)

  22. nostahl
    Member
    Posted 10 months ago #

    how do I get to the access rights page, I tried logging in as administrator and only pages it gives me is all menu items or add new item, all the rest are not there- also if I try to manually type in the url it gives me permissions denied etc

    so there's gotta be something saved in the db thats not letting me do this some how?

  23. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    all access rights are linked to and used like native user roles and capabilities (i.e the way wordpress handles user roles....)
    there's no extra entry in the db option table you could edit/change/delete

    -- none of the below ideas have been tested and might screw up things entirely !!!!-----

    a) get yourself one of the user role management plugins and see if you can sort out the roles/capabilities that way if you cannot get access to any of them anymore from anywhere as admin.
    the capabilities you are looking for are these

    $wppizzaRoleCap[]='wppizza_cap_settings';
    	$wppizzaRoleCap[]='wppizza_cap_order_settings';
    	$wppizzaRoleCap[]='wppizza_cap_gateways';
    	$wppizzaRoleCap[]='wppizza_cap_order_form_settings';
    	$wppizzaRoleCap[]='wppizza_cap_opening_times';
    	$wppizzaRoleCap[]='wppizza_cap_meal_sizes';
    	$wppizzaRoleCap[]='wppizza_cap_additives';
    	$wppizzaRoleCap[]='wppizza_cap_layout';
    	$wppizzaRoleCap[]='wppizza_cap_localization';
    	$wppizzaRoleCap[]='wppizza_cap_order_history';
    	$wppizzaRoleCap[]='wppizza_cap_access';
    	$wppizzaRoleCap[]='wppizza_cap_tools';
    	$wppizzaRoleCap[]='wppizza_cap_delete_order';

    b) delete 'wppizza' option from the option table of the db that relates to that particular site in your multisite setup. leave all other options alone. when you then go to the admin section of that sub-site, it will re-install the plugin , so you will have to re-set your settings again and delete all the default added items and pages , but it should not delete any items/categories etc you have already entered, it will just add to them

    also, the user that is doing it - i.e admin hopefully - will get all the above capabilities as default....

    WARNIING WARNING WARNING :: BACKUP YOUR STUFF FIRST THESE ARE JUST SOME IDEAS THAT MIGHT WORK. THEY HAVE NOT BEEN TESTED

    did I say : WARNING ?!

  24. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    > also if I try to manually type in the url it gives me permissions denied etc

    well, yeah, would be a pretty crappy access right implementation if you can just type it in , wouldnt it :)

  25. nostahl
    Member
    Posted 10 months ago #

    also on the front end the short codes are displaying now for the menu instead of processing it.

  26. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    btw, ideas a) and b) are seperate ideas, NOT do a) and then b) . just to be clear

  27. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    >also on the front end the short codes are displaying now for the menu instead of processing it.

    that - i would think - is totally unrelated.
    there's something else wrong here

    i have a multisite setup on wp-pizza.com and it just does what it's supposed to do (all the demos there are multisite-sites)

  28. ollybach
    Member
    Plugin Author

    Posted 10 months ago #

    and every sub-site has the access rights option as intended......
    i'm beginning to think something else is screwed up as the namechange we did at the beginning of this thread cant really have any impact on any of that

  29. nostahl
    Member
    Posted 10 months ago #

    I was just looking back, i did the name and slug lines

  30. nostahl
    Member
    Posted 10 months ago #

    i have the user role editor plugin installed and checked admin user and he does intact have all the wppizza options checked for him it says. hmmm

Reply »

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.