Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

WooCommerce - have code and database

Another day in the Woo world :)


Offshore devs gave us the information for AWS. I SSH-ed. I can see the code folder. I can get to MySQL database and look at the tables/data.


Now, how do I open this PHP code? I copied all the files to my local drive (I'm on Windows tho). I have NetBeans locally. Do I even need to open the code like .Net code in Visual Studio. 


How does it all work with Woo and PHP and changing code? or do I need to just go to Admin and make changes to pages there?


ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Camillia

ASKER

Thanks, Scott. Let me look at this code today. I know they haven't coded any custom plugins.
Every theme is different. Before you dive in, get used to playing with the core WP set up. Also, figure out what you really need code for. More than likely there is no code and they made all the updates in the theme including some custom css that could be saved to the database and not a file. You really don't want to find things by looking in the database other than just being nosey to see on things are set up. You have to let WP work.  It's that functions.php page in the child theme where things start for customization.


Thanks, Scott. I just want to poke around and learn how Woo/WordPress works. Not coding anything on this project.

I know they have custom css and said they created a child theme.

Django and Python are like that too...I learned I didn't need to go to the database. I'm used to going to the database first.

I'll look at the folders but won't change anything.

I didn't know custom CSS...I'm sure they have it...is saved in the database. 
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You asked...

1) How does it all work with Woo and PHP and changing code?

You don't, as any changes made to code will almost surely be overwritten at some future time, when code is updated by the plugin developer.

To accomplish code/behavior changes, you'll write a functional plugin (single function, likely zero config plugin, to implement new behavior).

2) or do I need to just go to Admin and make changes to pages there?

Be a bit more specific on what you're trying to accomplish.

3) I didn't know custom CSS...I'm sure they have it...is saved in the database.

Hopefully all CSS is on disk in files.

If CSS has been crammed into the database... time to fire some devs... IMHO...
>>time to fire some devs... IMHO...

My manager who's chronically frustrated is frustrated with all this and wants to terminate the contract. We're putting a list of TODOs together.

With two weeks to go, I'm not (we're not) going to spin a new site. I think we have to take whatever we have Live and deal with the aftermath.

This question was for my own understanding. Not going to make any changes.

What surprises me is that they kept saying using offshore and this small site is a good test to see how Woo + offshore work. They kept saying we'll trash the site. It only costing us $25 an hour. It's fast and cheap. But with the deadline looming and owners of the company pressuring...management is all frustrated and panicking. Odd way of running a project.


I see a child Theme folder. That's good. And the other folders in "Avada-child-Theme"

User generated image

User generated image
Cool, I use Avada myself. That has turned out to be a good theme to use.

However, it can be confusing at first because there are multiple ways to make changes. There is a custom css option that will write to a file rather than the db. But it may also be cached and you have to remember to recycle that.

All of that can be found at the top left of the admin portal, click on "Avada" then "Options"

FYI, I have asked and was told I can keep a copy for development either local or behind password protection. However, I tend to always just buy two licenses for staging and live.
In that options area, there is the ability to set defaults. But you can also set defaults in the custom css as well. Check with the offshore folks what they did to save you some time.
Thanks, Scott. I'll look now.

>>But you can also set defaults in the custom css as well. Check with the offshore folks what they did to save you some time.

Ask them what exactly? if they have a custom CSS? communicating with them is very difficult. I started putting everything in email and even in email....I have to be very specific with my questions.

Under "custom css" in Avada, I see this

User generated image
If you are going to continue with that site, make sure you have the license.

You should have access to https://theme-fusion.com/login/ as well as https://themeforest.net/downloads where you see the Avada Theme.  In the downloads you will have a purchase code that you plug in to the theme-fusion site to get the registration code found at yoursite.com/wp-admin/admin.php?page=avada

As long as you have that, you get lifetime updates. You also get 6 months support though they take a day to turn around but are typically on target. 
That means you have a file at
/wp-content/themes/Avada-Child-Theme/style.css that is blank as that is what it writes to.

In /wp-content/themes/Avada-Child-Theme/ you can check for other css files. My bet is they set everything in the options

User generated image

I'll check "colors" and "background" now.

I don't know how/where offshore got the theme. I'll see if they have the login info (as much as I can, I want to avoid asking my chronically frustrated manager)

Side note: I made a mistake. When I first started in Sept, I wanted to ask the managers if I could sit with the offshore devs and learn this from them. But I was new and they were so excited about getting a site up "cheap and fast" and kept saying "this is their project, we're too busy". I wish I had insisted. It will be fine,tho. Management wants to cut them off asap. I'll get as much info from them as I can. Thanks for all the help here :)



>>That means you have a file at
/wp-content/themes/Avada-Child-Theme/style.css that is blank as that is what it writes to.

In /wp-content/themes/Avada-Child-Theme/ you can check for other css files. My bet is they set everything in the options


--- the style.css file has css in it. I don't see any other css files in this folder

User generated image 
That style.css file is written by the custom css section in the options you showed https://www.experts-exchange.com/questions/29229909/WooCommerce-have-code-and-database.html#a43369612 

If you update that, then edit your style.css you will see the change.  

Under the options towards the bottom is an, "Advanced" link. And at the bottom of that page is an option to clear the avada cache. You may need to hit that when you update the custom. . 
Thanks. I won't change anything. I'll make a note of all this for my manager. 
Yes. So long as you don't bring up the code under a running LAMP Stack - Apache + MariaDB/MySQL - no duplicate rebills can occur, so you'll be good.

And... ssh + vi... is your friend...
Thanks, David. Just poking around now.

--- Questions:

1. That style.css file is written by the custom css section in the options you showed https://www.experts-exchange.com/questions/29229909/WooCommerce-have-code-and-database.html#a43369612 
If you update that, then edit your style.css you will see the change.  

 
Style.css has css code in it. When I go to "custom css" in Admin, it's empty. If I add CSS code in "custom css" and update, the changes will be in style.css?

2. Under the options towards the bottom is an, "Advanced" link. And at the bottom of that page is an option to clear the avada cache. You may need to hit that when you update the custom. 

I don't see an option to clear cache. I see these:

User generated image
 User generated image
User generated image
User generated image
User generated imageUser generated image

Click on the performance link and go to the bottom.

Hey, let's keep this thread on track and instead of rolling issues, let's keep this to one specific issue or we don't help anybody.  
I see it now. Thanks. How often should cache be cleared? after every CSS change?
You don't need to do it regularly. Only on an update. If you don't see a change updated, then recycling the cache may do the trick. 
Got it, thanks