Can't get sample cart to work

55 views
Skip to first unread message

Anna Kraus

unread,
Mar 24, 2020, 12:59:43 AM3/24/20
to Slatwall Commerce
I am trying to use Slatwall. I have installed it on my server and the backend seems to be working. I would like to see what the sample shopping cart looks like. When I try to run it by going to meta/sample/index.cfm I get the following error:

can't call method [getAppName] on object, object is null

The Error Occurred in
/samplesite.com/public/views/templates/_slatwall-header.cfm: line 77
75: action:'slatAction'
76: ,basePartialsPath: '/org/Hibachi/client/src/'
77: ,customPartialsPath:'/custom/apps/#$.slatwall.getSite().getApp().getAppName()#/#$.slatwall.getSite().getSiteName()#/templates/partials/'
78: };
79: </script>

Anyone able to tell me what I am doing wrong? 

Chris Kent

unread,
Mar 24, 2020, 5:08:29 AM3/24/20
to Slatwall Commerce
Hi Anna,

What version of Slatwall are you running?

I have not used the /meta/samples/ method to view the Slatwall front-end for a couple of years now, I use either Mura, FarCry or my own apps to present the front-end. There is also a basic CMS built into Slatwall now.

It is quite likely that the /meta/samples/application.cfc needs to be updated to work for more recent versions of Slatwall. 

What you can do to get around your initial issue is to create a Slatwall App. Go into the Slatwall admin and then Config/Applications and create an application. But I think this will then lead you to a second issue that the FW1 app has not been initialised, I have just tried this on a dev site. 

Regards,
Chris

A Kraus

unread,
Mar 24, 2020, 12:53:20 PM3/24/20
to Slatwall Commerce
I am using version 5.1.026

I am hoping that with what I have downloaded from Github that I can I run Slatwall as a standalone application and I was hoping it included a frontend. Is this possible? Is there a frontend (ie shopping cart) that comes with Slatwall? 

Thank you for any help that you can provide.

Chris Kent

unread,
Mar 24, 2020, 1:06:06 PM3/24/20
to Slatwall Commerce
Hi Anna,

Yes, Slatwall comes with a simple CMS. This allows you to use Slatwall as a standalone application.

From memory, and very basic guide.
  • Install Slatwall
  • Create an App, Slatwall Admin - Config/Applications
  • Create a Site, Slatwall Admin - Config/Sites, this will copy the front-end templates into the custom folder for your site. You can modify these templates to suit your requirements.
I use 2 (sub)domains to point to the Slatwall root one for Admin and one for Front-end.

The supplied templates are basic, but should get you going.

Regards,
Chris.

Anna

unread,
Mar 24, 2020, 1:20:22 PM3/24/20
to Slatwall Commerce
Hi Chris

Thank you very much for your help.

I did what you suggested and created an application and site, both called SampleApp. I can see that directories and files were copied to /custom/apps/SampleApp/SampleApp ..... with an application.cfc located in /custom/apps/SampleApp

It is still not clear how to access the front end. I don't see any index.cfm or index.html file in the newly created directories. Did I miss a step? 

Thank you
Anna

Chris Kent

unread,
Mar 24, 2020, 1:31:12 PM3/24/20
to Slatwall Commerce
From memory I use 2 domains both pointing to the same root folder was the simplest way to set up. 

One for Slatwall admin

One for front-end. You need to assign this domain in the site admin. 

If done correctly, Slatwall should then present either the admin or front-end depending on the domain.

Regards,
Chris.

Anna

unread,
Mar 24, 2020, 2:47:30 PM3/24/20
to Slatwall Commerce
I just want to make sure I understand this correctly.
  1. I have created a subdomain called slatwall.mysite.com that points to directory that contains all of the slatwall files
  2. Using the Slatwall admin I have created an app and site, both called sampleapp
  3. I have created a second subdomain on my server called sampleapp.mysite.com and it points to the same directory as slatwall.mysite.com
  4. If I go to sampleapp.mysite.com I should be able to launch the frontend.
Do I understand this correctly?

Thank you for all of your help.

Anna

On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Chris Kent

unread,
Mar 25, 2020, 5:18:08 AM3/25/20
to Slatwall Commerce
Hi Anna,

I have just fired up a "develop" branch Slatwall container and done the steps previously outlined.

One quick obvious fix was to add the slatwall-footer to the end of tjhe default.cfm template.
<cfinclude template="_slatwall-footer.cfm" />
This may have resulted in blank pages for you as the content was being hidden.

The only other change i did was to amend the included menu to have links to the home, product listing and my account content pages. See attached screenshots.

Note: The supplied templates are Bootstrap 3 so do not look great. Apply simple changes to the column classes etc. to bring this up to Bootstrap 4 and you will soon get these looking a lot better.
I have not done much testing on the Slatwall provided CMS front-end as I have my own enhanced version, so be prepared to do some investigation and maybe minor changes/fixes to get this up and running.

Regards,
Chris.
Slatwall CMS Home.png
Slatwall CMS Product List.png
Slatwall CMS Account.png

Anna

unread,
Mar 25, 2020, 12:30:35 PM3/25/20
to Slatwall Commerce
Here is what I have done:
  1. I have created a subdomain called slatwall.mysite.com that points to directory that contains all of the slatwall files
  2. Using the Slatwall admin I have created an app and site, both called sampleapp
  3. I have created a second subdomain on my server called sampleapp.mysite.com and it points to the same directory as slatwall.mysite.com
Here is what happens:
  1. If I go to slatwall.mysite.com I get the admin backend
  2. If I go to sampleapp.mysite.com I also get the admin backend
How do I access the cart?

Do I understand this correctly?

Thank you for all of your help.
On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Chris Kent

unread,
Mar 25, 2020, 12:36:32 PM3/25/20
to Slatwall Commerce
There's an option on the site to allow access to the admin - disable this for the front-end site.

Regards,
Chris.

Anna

unread,
Mar 25, 2020, 1:08:34 PM3/25/20
to Slatwall Commerce
Admin is already disabled. Here are my settings:

Capture.PNG



On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Chris Kent

unread,
Mar 25, 2020, 1:38:31 PM3/25/20
to Slatwall Commerce
Try "sampleapp.mysite.com" in the Domain Names

Regards,
Chris.

Anna

unread,
Mar 25, 2020, 1:50:54 PM3/25/20
to Slatwall Commerce
I made the change to the domain name as suggested and it still goes to the admin backend.

I did notice that when I go to sampleapp.mysite.com that it automatically appends: ?slatAction=main.login&fw1pk=3  to the URL

Thank you for all of your help


On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Chris Kent

unread,
Mar 25, 2020, 4:26:18 PM3/25/20
to Slatwall Commerce
Hi Anna,

I do not know what else to suggest right now. I have just checked my local dev server again and all working as expected using the details I have provided. 

From what you are saying, you have entered sampleapp.mysite.com as the domain name. Double check the spelling. make sure you do not have any other redirects occurring. Lastly, try a Slatwall reload. 

If this still fails, then it will take some local debugging to find out what is going wrong on your server.

Regards,
Chris.

Chris Kent

unread,
Mar 26, 2020, 4:20:46 PM3/26/20
to Slatwall Commerce
Hi Anna,

One suggestion would be for you to retry with the develop branch. This is the branch that is working for me.

There is a 9 month gap between master and develop. I do not think the files in /public/views/templates/ will have changed, but the code to control the CMS views may have been updated.

Regards,
Chris. 

Anna

unread,
Mar 28, 2020, 3:58:46 PM3/28/20
to Slatwall Commerce
Thank you for all of your help.

Which developer branch should I use? Should I try develop-6.0?


On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Chris Kent

unread,
Mar 28, 2020, 4:18:55 PM3/28/20
to Slatwall Commerce

Anna

unread,
Apr 10, 2020, 1:28:43 PM4/10/20
to Slatwall Commerce
Thank you for all of your help

I have installed the dev version as suggested. I am using a Linux server so table names are case sensitive in the database. I am finding that some of the references to the database tables in the code are not using the same case as the table name in the database. 

My current bug that I can't seem to solve is that after I login I am getting the error:
INSERT INTO swaudit (auditID,auditDateTime,auditType,sessionAccountEmailAddress,sessionAccountFullName,sessionAccountID,sessionIPAddress) VALUES ('f23a8425cd4c41c0b1fe5c74f724f8c1',{ts '2020-04-10 12:21:07'},'login','sam...@myemail.com','Joe Smith','4028818f715d1c2c01715d38f01c0008','50.68.202.8')

Table 'slatwall.swaudit' doesn't exist

I believe this is because the table name is SwAudit and not swaudit. My problem is that I cannot find where this code is to fix it.

I do know there is a config flag that I can change in MySQL to ignore case but from what I have read my understanding is that this is not advised.

Any help with this problem or if you have any other advice to solve the case issue is very much appreciated. 




On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Sumit Verma

unread,
Apr 10, 2020, 1:38:53 PM4/10/20
to SlatwallEcommerce
Anna,

You will need to change the lower_case_table_names setting to 1 in mysql to avoid case sensitive lookup. 

Thanks,
Sumit





Sumit Verma
Partner / Vice President | ten24, LLC
office: 877.886.5806 x 103 | mobile: 617.290.8214
www.ten24web.com | www.linkedin.com/in/sverma | twitter: blogonria


--
You received this message because you are subscribed to the Google Groups "Slatwall Commerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slatwallecomme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/slatwallecommerce/a52847dc-2e79-4a2f-baf7-99548f03bb39%40googlegroups.com.

Anna

unread,
Apr 10, 2020, 1:40:21 PM4/10/20
to Slatwall Commerce
Ok, I just fixed my previous problem by fixing the reference to swaudit in HibachiAuditService.cfc

Next problem:
I am trying to create an application. I enter sampleapp. 

createapp.PNG


but I get the error:

can't cast String [/home/mysite/slatwall.mysite.com/apps] to a value of type [void]


The error seems to be from line 100 in file AppService.cfc


I hope someone cal help me with this




On Monday, March 23, 2020 at 9:59:43 PM UTC-7, Anna wrote:

Anna

unread,
Apr 10, 2020, 1:43:08 PM4/10/20
to Slatwall Commerce
Thank you for your suggestion.

I am hoping to avoid setting lower_case_table_names  to 1. 

I was able to change the reference to swaudit in HibachiAuditService.cfc but now I have an error when trying to create an application. I
To unsubscribe from this group and stop receiving emails from it, send an email to slatwall...@googlegroups.com.

Chris Kent

unread,
Apr 10, 2020, 2:10:05 PM4/10/20
to Slatwall Commerce
Hi Anna,

If you have not changed the setting for lower table names then you would be best to restart your install after doing this. 

Do not try and continue with your current setup there may be some things set up and other not due to the table case issue. Best to start from scratch for a reliable system.
  • Delete your current database and file structure
  • Set lower_case_table_names setting to 1
  • Create new database and ensure datasource is set up
  • Rerun the install in browser as you did previously
Regards,Chris

Anna

unread,
Apr 10, 2020, 2:37:22 PM4/10/20
to Slatwall Commerce
Hi Chris

If I do what you suggest then I end up with all of the tables in my database with lowercase names. The code does not refer to the tables using all lowercase.

I am trying hard to avoid changing the setting for lower case names since that affects all of my databases on the server and I have other sites running on the same server.

Here is what I have done so far:
  1. On my local computer which is running windows I have the flag set to 1 and installed slatwall.
  2. The database created had all of the tables names in lowercase
  3. I then renamed all of the tables so that the names matched the case used in the code
  4. On my local computer I exported the database and then imported to my database on my server running Linux
  5. There were a few files that were referring to some database tables using all lowercase and I changed them to match what the rest of the code uses.
I can login to the slatwall site but I cannot create an application

Chris Kent

unread,
Apr 10, 2020, 4:44:56 PM4/10/20
to Slatwall Commerce
Hi Anna,

I did hit a similar issue a few years ago when I still used a local Windows development environment and nix based production/staging environment and case sensitivity table names. 

I have used Slatwall in a variety of environments. I now use Docker and Linux containers for all local development and aim to use the same for production/staging for most new client work. I do have clients that I have inherited with existing Slatwall setups already have Windows servers some MySQL some MS SQL So far no issues in setting up a local Docker/Linux setup for each client even those with Windows based servers. Any DB issues are usually related to MS SQL and matching the build versions with older server installations and a new version of MS SQL on Linux.MySQL is usually a lot easier to set up.

Have you tried a fresh install including new database setting up Slatwall on your Linux server and then copying back to your local Windows development server? This may avoid the difference in case sensitivity OS's as you are going from Linus to Windows.

Regards,
Chris.
Reply all
Reply to author
Forward
0 new messages