PDA

View Full Version : Now what?



greentr
December 11th, 2003, 07:42 PM
Hello,

I'm pretty new to the .php & MySQL world, & have a few general questions.

Okay, I have a site that will sell products. I've already started the design of the site and have a layout I'm confortable with. Now that I'm using SquirrelCart, how can I keep the current layout of the site & use the cart?

Do I insert the php tags into the html wherever I want a certain function of the cart? (category/product listing? searches? add to cart?, etc)

After the installation, I pull my the demo store @ mydoman.com/store.php. But from here, how do I get into the Admin section of my cart? & do I need to go through & delete all the products/categories in the demo store and add my own from there? or is the demo store, just that... a demo store? do I create one from scratch?


Thanks for the help,

Mike

Jamie
December 11th, 2003, 10:01 PM
Hi Mike,

I would recommend renaming your index.htm file to index.php so PHP will be able to parse the code that squirrelcart needs. You can rename the file, and it will still appear as it does now when people go to http://yoursite.com. If you do end up using index.php as your main cart page, you will need to set the $cart_page in your config file accordingly.

Then, you need to put the code necessary for the cart to function where you want it on your site. Each piece of code is explained in the documentation, which you can find at http://yoursite.com/squirrelcart/docs

After you do that, if you need to customize anything else, you will need to modify templates. The proper way to modify templates is explained in the documentation. You will most likely want to modify window.php, which controls the navigation boxes.

Thanks,
Jamie

greentr
December 12th, 2003, 07:56 PM
Jamie,

Hi, Thanks for the info. What about the demo store & demo products? Do I need to delete the demo store products and add my own? or create a new one from scratch.

Also, how do I get to the Admin section?

Thanks again,
Mike

Rich
December 13th, 2003, 11:26 AM
Hi Mike,

You can delete the existing products and categories, then add your own. Those are just in there to give you a feel for the store without having to add anything right away. If you don't want to delete the categories, you can simply rename them and change (or remove) their images.

There are two ways to access the admin control panel:

Login on the main page using the default admin username and password, then click Edit Records. OR Go to http://www.yoursite.com/squirrelcart/index.php and login from there.
Regards,
Rich

greentr
December 13th, 2003, 06:13 PM
Hi again,

per Jamie's "I would recommend renaming your index.htm file to index.php so PHP will be able to parse the code that squirrelcart needs. You can rename the file, and it will still appear as it does now when people go to http://yoursite.com. If you do end up using index.php as your main cart page, you will need to set the $cart_page in your config file accordingly."

Okay, If I name the index.htm file I have currently sitting on my host to index.php, It's not really changing or even touching the "content" of the file, it's just giving itself the ability to parse the php code? correct? okay, so every page that I use a SquirrelCart function, that page should have a .php extension???


Is it possible to have sub categories within categories, correct?

say like:

ice cream / chocolate / milk chocolate / brand 1
ice cream / chocolate / milk chocolate / brand 2
ice cream / chocolate / milk chocolate / brand 3

ice cream / chocolate / dark chocolate / brand 1
ice cream / chocolate / dark chocolate / brand 2

ice cream / vanilla / brand 1
ice cream / vanilla / brand 2
ice cream / vanilla / brand 3

can you have any 1 product be in more than 1 category? like, could you have a wall painting in HOME DECOR, PAINTINGS, & NEW ARRIVALS categories?

also, if I decide to delete the products within the demo store from the admin section, will I also have to delete the product images on my server? or my host's server?


again... thanks for all the help,

Mike

Rich
December 14th, 2003, 03:43 AM
Hi again,

per Jamie's "I would recommend renaming your index.htm file to index.php so PHP will be able to parse the code that squirrelcart needs. You can rename the file, and it will still appear as it does now when people go to http://yoursite.com. If you do end up using index.php as your main cart page, you will need to set the $cart_page in your config file accordingly."

Okay, If I name the index.htm file I have currently sitting on my host to index.php, It's not really changing or even touching the "content" of the file, it's just giving itself the ability to parse the php code? correct? okay, so every page that I use a SquirrelCart function, that page should have a .php extension???Correct, on all accounts. The content of your original index file will not change, and any file that uses a Squirrelcart function needs to have the .php extension.



Is it possible to have sub categories within categories, correct?Yes, sub-categories are possible.



can you have any 1 product be in more than 1 category? like, could you have a wall painting in HOME DECOR, PAINTINGS, & NEW ARRIVALS categories?Yes, a product can be in as many categories as you want. There is no limit.



also, if I decide to delete the products within the demo store from the admin section, will I also have to delete the product images on my server? or my host's server?When you delete a product, it's images will automatically be deleted UNLESS there is another product using the same image. In that case, the image WILL NOT be deleted.



again... thanks for all the help, No problem! :squirrel:

greentr
December 14th, 2003, 05:58 PM
Hello,

Have another question... Okay as mentioned above, I already have a layout for my site. I have a menu that's going to point to my categories (see attachment). Exactly, how is that done? Do I link to a .php page that calls a query via a .php tag on all the products in a certain category?

Say a user navigates to Store Directory/Home Decor/Furniture.
I need to have a .php page that calls a query on all my products in the
/Home Decor/Furniture category?

Am I on the right path?

Also, I was walking myself through the Admin section. I know from the above reply that sub categories are possible, but how? I'm having to download LOTS of graphics for my products and categorize each one. I just want to make sure I get each one lined up the right way, the first time.

Lets say I have an item that needs to be in category /Home Decor/Clocks & also in category /Inspirational. When I set the item up through my Admin section, will I only set that product up once and add it to multiple categories, or will I have to add it to 1 category & then add the item again in a different category?

Again,

Thanks a bunch,
Mike

Jamie
December 16th, 2003, 01:02 PM
Hi,


Have another question... Okay as mentioned above, I already have a layout for my site. I have a menu that's going to point to my categories (see attachment). Exactly, how is that done? Do I link to a .php page that calls a query via a .php tag on all the products in a certain category?

I would suggest you try the following:

1. rename your existing index page to index.php so it gets parsed by PHP.
2. change your $cart_page variable in your config file to reflect this change
3. add the include for the config.php file at the top of the page.
4. add the php for the cart content section wherever you want it to appear
5. add the last php section from the store.php file to the bottom of the page
6. change your links to your categories to the following:


http://yoursite.com/index.php?crn=123&action=show&show_products_mode=cat_click

change 123 to the record_number for each category.



None of this will make sense unless you read the customization section of the documentation. :squirrel:




Also, I was walking myself through the Admin section. I know from the above reply that sub categories are possible, but how?

To make a category a sub category, you need to specify it's parent category in the "Relationship Section" on the sub category record. You do not need to add a unique product record for each category to appear within another category. You just need to click "add Parent Category" in the Relationship section to specify that the category is within another category.

Thanks,
Jamie

greentr
December 20th, 2003, 03:38 PM
If I change my index.htm page to index.php do I also need to change:

FROM:

<?
if ($SESSION['show_home_page']) {
include "home.php";
} else {
?>


TO:

<?
if ($SESSION['show_home_page']) {
include "index.php";
} else {
?>


Thanks,
Mike

greentr
December 20th, 2003, 04:22 PM
Hello,


Hi,

I would suggest you try the following:

1. rename your existing index page to index.php so it gets parsed by PHP.
2. change your $cart_page variable in your config file to reflect this change
3. add the include for the config.php file at the top of the page.
4. add the php for the cart content section wherever you want it to appear
5. add the last php section from the store.php file to the bottom of the page
6. change your links to your categories to the following:


http://yoursite.com/index.php?crn=123&action=show&show_products_mode=cat_click

change 123 to the record_number for each category.




1. I renamed my index.htm page to index.php

2. I changed the $cart_page variable in the config file to
$cart_page = "/index.php";

3. I added the include at the top of the index.php page
<? include "/home/greentr/public_html/squirrelcart/config.php";?>

4. I added the php tags for the cart at the bottom of my page to test it. I haven't added any products/categories... still have the "demo store" products.
<?
include "$cart_isp_root/cart_content.php" ;
?>

5. I added the following to the very bottom of the index.php page:
<?
$HTTP_SESSION_VARS['sc'] = $SC;
?>

* When I load the page, It doesn't look any different that before I changed it from index.htm. How come the php tags don't show when you RIGHT CLICK, VIEW SOURCE?

* Is the <? stylesheet("store.css"); ?> tag neccessary, or do I need it only if I want to use a stylesheet?

* Could you explain the following php tag a little further...
<?
if ($SESSION['show_home_page']) {
include "home.php";
} else {
?>

Do I need to change the "home.php" to "index.php" since I renamed from index.htm to index.php?

* If I don't want to display the Left Navigation, Right Navigation, etc. I can leave those php tags out... correct?

My site is www.greentreegifts.com

Thanks again,
Mike

Rich
December 22nd, 2003, 01:13 AM
How come the php tags don't show when you RIGHT CLICK, VIEW SOURCE?

PHP code is not displayed in a web page's source code. It is processed by the server and replaced by the code's output.



* Is the <? stylesheet("store.css"); ?> tag neccessary, or do I need it only if I want to use a stylesheet?

There are elements of the cart that are control by the stylesheet referenced in that code. You should leave it in place.



* Could you explain the following php tag a little further...
<?
if ($SESSION['show_home_page']) {
include "home.php";
} else {
?>

That is the code that's used to display the different parts of the cart in the main content section. The portion that you quoted here is used to display the content of home.php in your index.php file when no products or categories have been selected.



Do I need to change the "home.php" to "index.php" since I renamed from index.htm to index.php?

No, you should not change home.php to index.php.



* If I don't want to display the Left Navigation, Right Navigation, etc. I can leave those php tags out... correct?

Yes, you can.



Thanks again,

No problem!

greentr
December 22nd, 2003, 07:15 PM
Hey again,

Sorry, almost got it down.

Okay. First, the style sheet. If I want to edit the .css file, what cart elements are controlled by the style sheet? the /* form elements*/ ??? I don't want to edit something I shouldn't. And can I leave only those elements in the style sheet? I'm using other <style></style> tags within my pages.

Here's a copy of what my style sheet reads:

<STYLE type=text/css>
BODY {text-align: center; MARGIN-LEFT: 2; MARGIN-TOP: 0; COLOR: #000000; FONT-FAMILY: Tahoma, Arial, Monospace; FONT-SIZE: 8pt;}
/* form elements*/
</STYLE>



Next, I'm back at the following code...

<?
if ($SESSION['show_home_page']) {
include "home.php";
} else {
?>

This is the code that displays the "main" content of the cart... correct? if so, this code should be placed within the html of the index.php page wherever I want the content to display? so, to edit the look of that content, I will edit the home.php file? right? or is this where the themes/templates come in to play?

or is this code for like "default" content?

What is the difference between

<?
if ($SESSION['show_home_page']) {
include "home.php";
} else {
?>

and

<?
// Cart Content section
include "$cart_isp_root/cart_content.php" ;
?>

???

I copied the following from the /docs: where does the code in red belong? after the closing table tag after
include "$cart_isp_root/cart_content.php" ; ?

The section below displays the main content section of the cart. This is where the products are displayed, where check out occurs, and all other major functionality of the cart takes place
<?
// Cart Content section
include "$cart_isp_root/cart_content.php" ;
?>
</td>
</tr>
</table>
<? } ?>
<br>
<a target="new" href="http://www.squirrelcart.com"><img border="0" width="119" height="37" src="squirrelcart/images/cart/powered_by_squirrelcart.gif" alt="Powered by Squirrelcart"></a>
</td>
<td valign="top" width="150" style="padding-top: 3">



Thanks a bunch,
Mike