X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Creating a new page (https://forum.x-cart.com/showthread.php?t=64981)

Cpt.Crashtastic 09-26-2012 08:13 AM

Creating a new page
I want to create a new page

I have created the main class with settings form

Created a menu link on the top menu which works realative to the settings

Created a View

Created a Controller

Essentially pretty much the same as the Contact Us module.

The menu works and shows the correct parameters for the page but the page refuses to show. Grrrr! "Page not found"

I am wondering if because my Dev Id is CorbyWebWorx I need to add the allowed targets function in the runCacheBuildHandler or do something different.

I have used

public static function getAllowedTargets()
return array_merge(parent::getAllowedTargets(), array('attach_image'));

Damned frustrating when you just want to get on with something more interesting.

Is it possible to bypass step 4 of the cache rebuild process as it takes ages on my PC?

xplorer 09-26-2012 09:13 PM

Re: Creating a new page
Please let us have your module so that we could tell you where is the problem.

It is impossible to bypass a step of the cache rebuild process. What is your MySQL versions? Versions older than 5.1.31 had an issue with the performance, upgrading to a newer version can make the process ~10x times faster

Cpt.Crashtastic 09-27-2012 12:56 AM

Re: Creating a new page
1 Attachment(s)
I've deleted near everything I have done and tried by replicating the contact us module. Still can't get it to work.

Thanks in advance.

PS I knew it wasn't possible to bypass but I was so fed with rebuilding yesterday. :-)

Getting 3663ms on my production server so I don't think I have any worries speed wise. My PC is a a lot slower :-( but its old and tired.

xplorer 10-02-2012 01:49 AM

Re: Creating a new page
Here is a tutorial on creating custom pages from your modules:

Cpt.Crashtastic 10-02-2012 02:06 AM

Re: Creating a new page
Thankyou very much xplorer

Onwards and upwards :-)

Cpt.Crashtastic 10-06-2012 03:44 AM

Re: Creating a new page
This does not work if your Dev ID is alphabetically after CDev

ADev works

DDev does not

Cpt.Crashtastic 10-06-2012 02:07 PM

Re: Creating a new page
I have corrected the namespaces in the github tutorial but there is something not right here.

In my previous post I pointed out that if your Dev ID was after CDev alphabetically, the "getAllowedTargets()" value gets dropped.

Annoyingly if you then use a Dev Id that preceeds CDev the getDefaultTemplate() is dropped and the templates fail to get transfered into var/run.

This is frustrating to say the least. I wish I'd looked a bit deeper when I first saw this tutorial as it is everything I've tried before. Maybe I could have pointed this out earlier.

I'm beginning to think this is possibly a bug although I have my doubts. I will post this in bt anyway including code

Cpt.Crashtastic 10-07-2012 05:02 AM

Re: Creating a new page
There were errors with quotes in the litecommerce Wiki.

I have corrected these so nobody else will waste a day trying to get this to work. :-)

All times are GMT -8. The time now is 05:03 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.