PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

[CONTRIBUTION] Sort Order in PrestaShop CMS

19 replies to this topic
#1
swguy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 95 posts
If you'd like to order your CMS pages in the info box in a different order than the order of creation, try my CMS Sort Order contribution.

http://www.thatsoftw...tashop_cms.html

Thanks,
Scott
That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftw...prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestasho...cker/view/3044/

#2
Sander Media

    PrestaShop Newbie

  • Members
  • Pip
  • 2 posts
Hi I have problem with module. When I change positions eg. 10 20 30 or 1 2 3 or 01 02 03 and click on update only one error is showing: Sort order must be numeric.

#3
swguy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 95 posts
PS version? PHP Version?
That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftw...prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestasho...cker/view/3044/

#4
Rockman X

    PrestaShop Apprentice

  • Members
  • PipPip
  • 35 posts
FANTASTIC!!
JUST WANT I NEEDED!!!

Thank you!

#5
The Geekz

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
Hi,

Thanks for this plugin.. however when I tried to install it... I'm running into some issues:

# Unzip the mod and copy all .php files to the root folder of your shop.
# Run the command "cms.sql" against your database in phpMyAdmin. If you have used a prefix other than "ps_" for your tables, modify this file accordingly (i.e. if config/settings.inc.php has '_DB_PREFIX_' set to 'ps1_', change `ps_cms` to `ps1_cms` in cms.sql.)

Unzip part, there's 2 directories in the zipped file, do I unzip them into the root, thus the files will replace the existing files in the modules & classes directories in the server? (this will cause my original infoblock module to be emptied of my existing information...

Run command cms.sql:

How DO I do that? Noob in phpmyadmin... Tried running it in the ps_ database under SQL tab by typing in CMS.SQL, but there's error..
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cms.sql' at line 1

Thank you.

#6
sree

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
thanks working g8.

check this link for sql script through cpanel
http://community.myb...hread-4720.html

#7
The Geekz

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
Sorry, I'm still unable to run the cms.sql in myphpadmin...

Any further help?

#8
The Geekz

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
anyone ... can help?

#9
Boros

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
In phpmyadmin, navigate to your database, and then in the SQL tab paste the content of the cms.sql file (alter table `ps_cms` add `sort_order` int(8) unsigned default '0' after `id_cms`). Apply and its done :)

#10
frosticek

    PrestaShop Apprentice

  • Members
  • PipPip
  • 53 posts
it is not working in 1.3.1, any idea ?
Kliknite sem a zarábajte peniaze len tým, že máte web stránku

T-BAZAR.sk - online bazár, inzercia zdarma, predaj a nákup. Pridajte svoj inzerát zdarma hneď !

http://www.abprofitrade.eu - tmely, autolaky, spreje

#11
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts
Oh my god, I did it as suggested, now everything in CMS is gone, AND in phpMyAdmin this error appears:

#1034 - Incorrect key file for table 'ps_cms'; try to repair it

I use wampserver and made a backup, changing it back to the backup didnt solve the problem, Should I also have made a backup for the database in phpMyAdmin? I didnt know that, and dont know how.

I tried to see if it worked, but nothing changed, so I restarted wamp and now nothing is shown in CMS and its says bad SQL.

What do I need to do to fix this.

Please help!

Regards,
Don C.

#12
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts
(See post before). Still not working.

I reloaded the backup again, and now the infoblock is working as before, so as the old module.

But now I see an error loading phpMyAdmin in IE, but not in Chrome!.

So I tried to install it again as described, and it still doesnt work... I also installed the php files.

In the phpMyAdmin in ps_cms it is indeed changed; the sort orded / 0 is added.

id_cms - sort_order
1 - 0
2 - 0
3 - 0
4 - 0
5 - 0
7 - 0
8 - 0
9 - 0
and so

But in the Backoffice the module is not changed. so there must be something wrong, with this also the phpMyAdmin error in message IE.

Who can help me/knows what I am doing wrong here.

Many thanks in advance!!

#13
frosticek

    PrestaShop Apprentice

  • Members
  • PipPip
  • 53 posts
I think this module is dangerous, in my case it changed premission on /temp folder in webftp and my website was disabled for 1 day till repair of webhosting
Kliknite sem a zarábajte peniaze len tým, že máte web stránku

T-BAZAR.sk - online bazár, inzercia zdarma, predaj a nákup. Pridajte svoj inzerát zdarma hneď !

http://www.abprofitrade.eu - tmely, autolaky, spreje

#14
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts
Really? Thats not good...

Anyone knows what went wrong? or has this working correctly?

#15
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts
I looked into the phpMyAdmin, and I think its in the setting in pc_cms file, there are a lot of settings...
There must be something that I need to change I guess, I have no experience however, but would like this solved.
I spent a lot of time on this already, can anyone please help?

Thanks in advance.
Don

#16
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts
Who can help with this please?

I just found out that when I select an item in infoblock there is nothing shown, only this message:

Fatal error: Class 'ObjectModel' not found in C:\wamp\www\prestashop\CMS.php on line 16

I checked but couldnt find anything, but of course I am not experienced with this.
Line 15-21 is:


class CMS extends ObjectModel
{
public $meta_title;
public $meta_description;
public $meta_keywords;
public $content;
public $link_rewrite;

So the CMS file that thatsoftwareguy uses not correct or is something else wrong?

I apprechiate any help.

Cheers!

#17
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts
Unforunately it seems that I cannot use this module.

Does anyone have it working correctly? Or does anyone know what I did wrong? I think its myPhpAdmin, but I am not sure...

#18
Mlsounkov

    PrestaShop Apprentice

  • Members
  • PipPip
  • 38 posts
Perfect!

Thank you!
Mlsounkov.cz

Tak už jsem taky přešel na PrestaShop™ ver. 1.4.7.0.

#19
Don Camillo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 91 posts

From 1300436216:

Perfect!

Thank you!


Perfect? Do you mean it works perfectly?
I cant get it to work, could you help?

Thanks

#20
dclaughton

    PrestaShop Newbie

  • Members
  • Pip
  • 5 posts
I had this contribution working fine in an earlier version of Prestashop. But the cms.php file in classes is no longer compatible with the newer versions. will there be an update?