Jump to content

Is there tutorial or documentation yet?


Guest groaningeek

Recommended Posts

Guest groaningeek

:D I was feeling quite comfortable making changes in cc2, but am feeling totally lost in ver3. Is there a tutorial yet, or some kind of documentation? If anyone could give me some general direction on how things work, I would appreciate it. I know that this is a very open ended question, but there has got to be others out there in the same situation. Perhaps some info on how the templates work etc.

Thanks

Link to comment
Share on other sites

Guest estelle

I've got no idea if there's documentation, but I doubt it (I'm sure brooky is too busy to write documentation!). You might have to be more specific with your questions... but here's a quick overview of things which are handy to know.

language/XX/lang.inc.php

Here are your various language files, in the different folders. If you want to modify almost any text that is shown on your website (not including text that is loaded from the database obviously) then this is where you make your changes. It also contains the text that is sent out in various emails to the customer(s).

skins/SKINNAME/...

Contains pretty much everything related to the look and layout of your site. Here there are images, stylesheets, and templates. In the template files there are, uh, "variables" that will be replaced with information from the database or your language files. E.g. in content/viewProd.tpl you will see {TXT_PRODTITLE} and {TXT_DESCRIPTION} etc, which will be replaced with the name and description of the particular product that is being viewed.

includes/boxes/...

includes/content/...

These are where the "variables" are setup with information from the database, or from the language files. This is also where some of the processing is done, so for example if you wanted to make some of the registration fields optional, or allow non-digit characters in telephone numbers, you would need to make changes in content/reg.inc.php. Also, this is where the database calls are made, so if you want to add a quick hack to change the order in which products or categories are displayed, this is where you make your changes.

Hope this helps (you and anyone else)! ;)

Estelle

Link to comment
Share on other sites

  • 2 weeks later...
Guest ianfitch

Hi Dave,

By macros do you mean the variables that get produced by the php code?

If so, they all appear to be defined in the *.inc.php files located in /includes/content/.

They are assigned like this:

$view_prod->assign("<the variable>",<the value>);

.

The value is usually produced by a mysql query.

You use the variable by surrounding it with curly brakcets and placing it in the corresponding .tpl page located in /skins/<your skin>/styleTemplates/content/.

Like this: {VAL_VALUE_NAME}

Hope this helps,

Ian

Link to comment
Share on other sites

FROM STYLES.CSS

.searchBtn = The "GO" button for your search box.

.searchBox = The search box attributes.

.textbox = The quantity box in your shopping cart, and the "Enter Product Code" text box.

.submit = The "Join Now" button for mailing list, and the "Add" button for adding product codes to shopping cart.

.txtSession = The text dealing with a customer's session; for instance, this will affect the text in your search box area, like the words, "Search for:", "Log In" and "Register"

.txtCopy, .txtSiteDocs = Affects text in the "Information" box and the "Mailing List" box.

.txtButton = The "Buy" and "More" and "Add to Basket" buttons appearing near product descriptions.

.txtOldPrice = This is the price which by default appears with a line struck through when the item is on sale.

.txtSale = Sets properties for the sale price text.

.txtSiteDocs, a.txtSiteDocs = Sets properties for the links at the bottom of the page, which link to pages on your site, "About Us" etc.

.txtDefault, a.txtDefault, a.txtLink, a.txtLocation = This is where you set the properties for the text that appears in your category links, popular products links, sub-titles to all the product pics, and the titles in your product descriptions (Product Names).

.txtContentTitle = Sets properties for the major headings on your site.

.tblList = this is the table that contains your items list for items contained in a category.

.txtCartPrice = This affects the text that reports the quantity and pricing of items in the cart.

.txtCart = Affects the text in the Shopping Cart reporting box, "Items in cart:" and "Total:"

.cartProgress = Sets properties for the cart progress box, "Cart » Address » Payment » Complete"

.txtcartProgressCurrent = Sets properties for the text that tells where the customer is now in relation to the progress bar.

.quickBuy = Sets properties for the text, "Want to add more items? Enter the Product Code:"

Link to comment
Share on other sites

Guest groaningeek

Thanks everybody for all your input. I'm starting to make progress to the point I can start being more specific with my questions. Another day or two and I'll be dangerous!

Link to comment
Share on other sites

Guest hartmurmur

includes/boxes/...

includes/content/...

These are where the "variables" are setup with information from the database, or from the language files. This is also where some of the processing is done, so for example if you wanted to make some of the registration fields optional, or allow non-digit characters in telephone numbers, you would need to make changes in content/reg.inc.php. Also, this is where the database calls are made, so if you want to add a quick hack to change the order in which products or categories are displayed, this is where you make your changes.

Phew. I want to remove some of the registration fields that are required....and re-order them.

So that's what I did. Now as I test the functionality, something's gone wonky. If I don't fill in all required fields and then submit the form, it says not all required fields are completed. That's good, but it doesn't re-populate the fields with what I already entered - which is how it worked before.

Any ideas?

Link to comment
Share on other sites

I'm not sure if you did this already..... but to change the set of fields that are required, you will need to change the field checks in reg.inc.php somewhere around line 45. Look for the following code:

if(empty($_POST['firstName']) || empty($_POST['lastName']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['add_1']) || empty($_POST['town']) || empty($_POST['county']) || empty($_POST['postcode']) || empty($_POST['country']) || empty($_POST['password']) || empty($_POST['passwordConf'])){

        $errorMsg = $lang['front']['reg']['fill_required'];




If you're fields are no longer being repopulated, i'm guessing you removed the Title field from your template? If so, you will need to make another change in reg.inc.php. Look for:




if(isset($_POST['title'])){



        $reg->assign("VAL_TITLE",$_POST['title']);

        ...

If you are no longer using the Title field in your template, you will need to change the if() statement to check for a different field. E.g. change it to: if(isset($_POST['firstName'])){

There may be other changes required as well, but see if this works.

Link to comment
Share on other sites

Guest hartmurmur

A ha. I did in fact remove the 'title' field. Pretty odd that the code would check to see if that is set in order to re-populate the form with the previously completed info.

Out of all fields to choose I would think the 'email' field would be the one to use since it must stay in there since it will be used as the person's login.

Better yet, use the 'submit' button. But wait, there is no real submit button.

(I really think this should go back to being a real form element than a javascript "submit" button.)

My $0.02.

Thanks for your help.

Link to comment
Share on other sites

:innocent:

I don't think it really matters what field is chosen, as long as that field is always sent as a POST variable. But the title field probably wasn't the best choice, since it doesn't have to be a mandatory field.

I'm not sure why Brooky chosen not to use a submit button in various places. I wonder what difference it would make?

Link to comment
Share on other sites

  • 3 months later...
Guest slsmayville

I'm just trying to find the macros for the boxes. I want to change around the template and am having a dickens of a time arranging the boxes when I don't know how to call them.

Any help, please?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...