Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Creating a new page

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-26-2012, 08:13 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default 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?
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
  #2  
Old 09-26-2012, 09:13 PM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

Default 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
Reply With Quote
  #3  
Old 09-27-2012, 12:56 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default Re: Creating a new page

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.
Attached Files
File Type: zip CorbyWebWorx-ImageAttachments-v1_1_0(1).zip (28.4 KB, 924 views)
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
  #4  
Old 10-02-2012, 01:49 AM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

Default Re: Creating a new page

Here is a tutorial on creating custom pages from your modules:
https://github.com/litecommerce/core/wiki/How-to%3A-Adding-a-custom-page
Reply With Quote
  #5  
Old 10-02-2012, 02:06 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default Re: Creating a new page

Thankyou very much xplorer

Onwards and upwards
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
  #6  
Old 10-06-2012, 03:44 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default Re: Creating a new page

This does not work if your Dev ID is alphabetically after CDev

ADev works

DDev does not
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
  #7  
Old 10-06-2012, 02:07 PM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default 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
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
  #8  
Old 10-07-2012, 05:02 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default 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.
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote

The following 2 users thank Cpt.Crashtastic for this useful post:
totaltec (10-09-2012), xplorer (10-08-2012)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:07 PM.

   

 
X-Cart forums © 2001-2020