Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Creating development Ultimate site Rate Topic   - - - - -

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 31 January 2013 - 12:25 AM #1

Anyone know how to create a cloned site for Ultimate? For PRO, I used to:
1) copy the document root to a new directory
2) create a subdomain using the new directory as the document root
3) copy the database to databasename_dev (add user, set perms, etc.)
4) Adjust config.local.php for new dbname and new domain name (I.e. dev.site.com)
5) remove the var/cache directory
6) login via dev.site.com/admin.php and add ?cc again (to pick up the other cached data)

But with ultimate, there is no ?cc to clear the cache. Yes, removing the var/cache directory does cause it to be rebuilt (I think).

But when I try to login via admin panel of dev.site.com/admin.php I just get taken back to the login screen. I.e. like it can't create the session and using just dev.stie.com generates an smarty error that it can't find exception.tpl (I.e. not finding the proper store for the main site)..

Has anyone created a development copy of a store and gotten it to work? If so, could really use this "list" so I don't have to spend hours figuring it out.

Unfortunately, this site has many problems since it was converted by someone else. So trying to create a clone to debug/fix it but I might be fighting a losing battle. Would appreciate any learning anyone has related to the specfics of Ultimate.

And how do you clear the cache in Ultimate?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Triplets
  • Senior Member
  • Members
  • Join Date: 23-Sep 08
  • 1182 posts

Posted 31 January 2013 - 01:12 AM #2

I am not sure what problems you are having. &cc works fine in Ultimate. The only difference is you need to choose a store first. Then you can clear the cache using &cc for that store. &cc doesn't do any good if you are on the All Stores setting.

Ultimate uses something like

/httpdocs/var/cache/templates/stores/1
/httpdocs/var/cache/templates/stores/2
etc.


In Ultimate paying attention to what store you are using is important. Also, some admin settings are only viewable and editable when using the All Stores setting.

 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 231 posts

Posted 31 January 2013 - 01:17 AM #3

Hi there,

I don't have a list, but I am sure I can help you out. I have a development, staging and live version of an ultimate store.

?cc works for me on an ultimate store when I have been modifying templates, you shouldn't have a problem there.

I am also in a login loop on admin for my staging site.. I am assuming that you have your domain names setup like:

www.livestore.com
dev.livestore.com

I found yesterday that I had a login loop on dev.livestore.com, and couldn't get in. But I could get into the admin for www.livestore.com. I found that when I was in the admin for www.livestore.com, I could get into the admin for dev.livestore.com

Maybe its a cookie issue or something like that in regards to subdomains..? Don't know.

I don't see a problem with the steps you have, the only one thing I would check is that you copied the directories with the correct permissions. Not sure what platform you are on, but you need to tell cp that you want to mirror the permissions. That might be your problem.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 31 January 2013 - 02:15 AM #4

I couldn't find where it looked for GET['cc'] or REQUEST['cc'] in any of the php files in the root of the store nor in the core directory.
If it's buried off in the templates now somewhere, that's a possibility.

I'm sure the admin issue is a session issue (cookie). I've seen this in PRO and when cs-cart helpdesk is asked about it they just give the standard "can't reproduce in the demo store" and tell me that when it can't create the session (or retrieve it from the session cookie) that's what happens. I tried it in two browsers and neither would work (FF and Chrome).

On the customer side I guess I'll have to instrument it to find out which store it is trying to access. There are both stores/1 and stores/2 and there are exception.tpl files in both stores/1/skins/customer and stores/2/skins/customers

I do notice there is now a stores/1/var/cache directory (and 2 also) so maybe it's a cache issue related to the customer side. Clearing it now but doing so via FTP takes forever. Will update if it has any effect.

Yes, I've cleared the browser caches as well for the admin issue(s).

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 231 posts

Posted 31 January 2013 - 03:16 AM #5

Cool, well you helped me anyway.. thought I had cleared the cookies, but it turns out I hadn't. At least I can get back into staging now.

Did you check the permissions? If you only have ftp access, i assume you downloaded the first store and uploaded again? Might be worth checking the permissions on the important folders.

Oh, the other thing to keep in mind when you duplicate a stores database is once you get access to the admin side. Go into the stores and make sure the storefront url is set correctly there, otherwise you will get a 404 error when you try and browse the site. I haven't seen anyone else mention doing this when it comes to duplicating a cs-cart installation. This setting isn't linked to config.local.php .. of course you could do this directly in the database (not sure what table it is in).

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 31 January 2013 - 07:36 AM #6

I used cpanel and tar archives to copy the site. All (both) under the same account.
Was able to get into admin after going a bit further back in clearing the cookies in one browser.
However, the customer side is still a nogo.

I see what you mean about setting the company URL. However, when I changed it and cleared the cache, the admin graphic still shows it going to the original domain name versus the new subdomain I just set it to. I checked the settings DB table and it has the proper value. Also tried logging out and back in, same result.

Turns out it is in cscart_companies and there are 3 fields to adjust (url storefront and secure_storefront). Did that and it seems to be working.

My hat off to you @natewallis

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 31 January 2013 - 04:59 PM #7

I've been doing this all along with Ultimate, I use the same steps as you with a few further changes required:

1) copy the document root to a new directory
2) create a subdomain using the new directory as the document root
3) copy the database to databasename_dev (add user, set perms, etc.)
4) Adjust config.local.php for new dbname and new domain name (I.e. dev.site.com)
5) remove the var/cache directory
6) run database query to replace instances of 'www.site.com' with 'dev.site.com'
7) login via dev.site.com/admin.php and add ?cc again as each individual store user (to pick up the other cached data per store)

I originally had the same problem, with the admin log-in loop, but found the issue to be caused by the storefront URL's being stored for the primary domain in config.local.php AND cscart_companies.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 31 January 2013 - 07:30 PM #8

I've seen the login loop issue in PRO when using subdomains. According to the helpdesk this is because it can't create a session. Clearing cookies for anything related to 'site.com' will provide temporary relief, but once both domains are accessed via admin, one tends to go away upon next login. Most notably in FF. I think it is because the use the base domain as the cookie name versus the FQDN. But not sure on that one. Debugging the Session class is a real pain since it's like Quantum Mechanics... When you look at it, it changes into something else!

Only issue in the list is that you need to be careful on your query is were were not using a 'www' hostname/sub-domain in the parent environment because 'site.com' will be in email addresses and all kinds of other things. I think the only table that must be changed for development is cscart_companies. Too bad this can't adjust in the admin environment so NO ONE has to edit the db directly.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 14 June 2013 - 12:38 PM #9

We're running v.3.0.6 on http://nazelie.com - so we wanted to clone the site for a development environment at http://2013.nazelie.com.... We followed the instructions below exactly (note that we don't have a separate SSL certificate for 2013.nazelie.com), including removing all cookies, clearing cache etc.

The consumer-facing portion works fine at http://2013.nazelie.com, but when you try to access the admin panel at
https://2013.nazelie.com/admincp.php, the browser redirects to https://nazelie.com/admincp.php

How can I resolve this?



I've been doing this all along with Ultimate, I use the same steps as you with a few further changes required:

1) copy the document root to a new directory
2) create a subdomain using the new directory as the document root
3) copy the database to databasename_dev (add user, set perms, etc.)
4) Adjust config.local.php for new dbname and new domain name (I.e. dev.site.com)
5) remove the var/cache directory
6) run database query to replace instances of 'www.site.com' with 'dev.site.com'
7) login via dev.site.com/admin.php and add ?cc again as each individual store user (to pick up the other cached data per store)

I originally had the same problem, with the admin log-in loop, but found the issue to be caused by the storefront URL's being stored for the primary domain in config.local.php AND cscart_companies.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 14 June 2013 - 08:51 PM #10

If you've updated your config.local.php properly, then you need to verify your redirects (cPanel as well as .htaccess).

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 14 June 2013 - 10:26 PM #11

If you've updated your config.local.php properly, then you need to verify your redirects (cPanel as well as .htaccess).


what am I looking for in cpanel?
.htaccess looks ok:

DirectoryIndex index.html index.php

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]

</IfModule>

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 15 June 2013 - 12:38 AM #12

Check the table cscart_companies and fix the URL's in the rows in there. There is no admin interface for adjusting those URL's.
Used to be that you could simply copy a DB and reference it. Not anymore.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 15 June 2013 - 02:04 PM #13

Check the table cscart_companies and fix the URL's in the rows in there. There is no admin interface for adjusting those URL's.
Used to be that you could simply copy a DB and reference it. Not anymore.


In version 3.0.6, the table is called csc_companies. I updated it (example.com), but the problem persists.... every time I try to access http://nazelie.net/admincp.php, I get redirected to https://nazelie.com/...url=admincp.php

Weird thing, there's NOTHING in the mysql database with nazelie.com....(did a global search & replace) so how the F%&C would it reroute to the nazelie.com domain???