Zen Cart Logo
Forums / General Questions / A few questions

A few questions

Locked

Views: 7,913

Results 1 to 20 of 45
This thread is locked. New replies are disabled.
17 Aug 2006, 9:42 PM
#1
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

A few questions

Ok I am far from new in web development, my experiences range around 4-7 years on multiple languages. Zencart is giving me a little trouble navigating around, I always build everything from scratch, I have even built a couple of larger shopping carts from scratch, with my own system. As for zencart, I am having a little trouble finding my way around, I am doing some stuff for a client(a programmer doing stuff for another client), and I have a few things I need to get done, and slight understanding about the zencart system. For one I am wondering, we created a page, that, is going to be like a color pallete for every item, so they can choose what color it's going to be laminated in or something. Now I built that page, it's fine, but I can figure out how to do the following.

  1. I need to get something worked out on the attributes page,
    http://www.furnishyourschool.com/index.php?main_page=product_info&cPath=78_100_101_103&products_id=228
    it should let you through, the thing I am wondering is below the item with a list of attributes. 4-5 drop down boxes, and a text box. I need to be able to manually modify the code in that section, but I can't find it, I need that subpage I created (using get query), to come to this page and populate the text field, for one thing.

  2. I also need the products having a link going to the other page I created, not carrying over data but going there.

  3. If I figure out how to do this, and get it working, will it still carry over the colors for every item seperately into the shopping cart or do I need to do something extra.

  4. Another major question, I need to get all of those fields aligned, properly, they all look retarded, and I don't understand why there unaligned, I guess they just need a little manual supervision, after cutting through files for af ew hours, and staring through the admin, I located a few of the main template pages, but can't seem to track down the appropriate subpages, I don't knwo teh system well enough to say much more than that, the index.php seems to have something to do with the page, but most of it is in som includes common folder, I can find a css file that has anything to do with those attributes, and I can't find anyplace I can add in some links manually, and do some things, Advice.?? Please. anybody.

17 Aug 2006, 9:52 PM
#2
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

Actually unfortunately it's password protected, but atleast hopefully someone else, can help answer those questions or point me in the right direction

17 Aug 2006, 10:23 PM
#3
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

I figured out how to add one using the panel, and I saw some of the css files but I can't find the information that controls them, what do I do to get this organized, I am supposing the css labels aren't there yet, so I will try putting the tags, but I could use some help finding out where to add that link, I need to be able to find out where they save the attribute information.

17 Aug 2006, 10:30 PM
#4
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

I found some css files but there not affecting it, I found what the attribute id's where and I used those and I found one called productattributes, it's also on that page, but whatever I put in doesn't work. if I could get a stylesheet that did something it would help alot'

17 Aug 2006, 10:32 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A few questions

Answers to your questions are

  1. These attributes are generated by includes/templates/template_default/templates/tpl_modules_attributes.php. Hopefully you've taken care to read the section in the Wiki and FAQ about over-rides and so know what you need to do to create an over-ride before starting to edit the code.

  2. As your site is inaccessible, it is not possible to understand this question.

  3. As this question follows on from question 2, it cannot be answered.

  4. The alignment of the attributes can be adjusted via the stylesheet, sometimes with tweaks in the attributes file mentioned above. Form layout can be tricky, but as as an experienced web designer, shouldn't give you too many problems.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

17 Aug 2006, 10:37 PM
#6
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

That helps me with almost everything, that will allow me to add my links, and everything that I need in that section. Can you explain about this overwrite, I will look into that in the meantime, but I did not understand that, I have never encountered it before. That should also allow me to handle everything with styling. Except it won't read my css file for some reason, I will work with that though.

17 Aug 2006, 10:43 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A few questions

Go here to read about over-rides. I note that you referred to the ID productattributes. Are your referring to it as #productAttributes in your CSS?

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

18 Aug 2006, 12:27 PM
#8
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

Ok, I have sorted some of this out, I am starting back on it today, I am just going to try and insert line breaks where the columns are, the attributes, I will try to put a space in between those and the names, since it might change alot me and the other guy decided this would be best all around, especially for the site.

That should take care of that problem for me, The other thing is, I have never encountered this problem before, but I see the main page in index.php and after looking through some of the system, a grand majority of the page, follows through to that, so the system is quite deep, what I need to do now, is get a link to appear based on an attribute. Ok you already know what attributes are obviously, So what I have to say is I need a certain link to appear, when certain Attributes are present. For instance one item might have 3 attributes you can choose from below it, but there has to be 2 different links for 2 of those, like one attribute it to get the color, so they click the link there "supposedly" it goes to the page I created, they pick a color, and it comes back into the page, where I populate that text field via get with the value, so it updates. So I know how to do all of that with ease, the question I have to ask is, obviously I only need that link to appear below that attribute, but more imporantly, only for that attribute, if the attribute isn't present, the link doesn't need to be either. He also needs to know how to do this, because when he get's back to the rest of site himself, he has to do this with a lot of them.

Now as for this thing about overrides, now I know what there for, and what they do, but I don't understand the positive/negative side to them. For instance, if someone did a lot of manual updating, on a lot of the pages, that COULD be manually overridden, and they didn't manually override, what kind of negative impacts would that have on the site, or the template. As for what I read, it said some could not be overridden, so I assume if you don't override some of the ones you can there would be no penalty?

18 Aug 2006, 12:39 PM
#9
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

I also had another concern. Even if I wanted to style the pages(I never had this problem), the css file isn't getting read. There are like 4-5 stylesheets, none of them actually had the tags for the attributes, I had to put those in there, but the attributes aren't responding, I tried in all stylesheets.
In different locations I found
print_stylesheet.css
stylesheet.css
stylesheet_css_buttons.css
all of those were under template default
Then I had
print_stylesheet.css
style_un_classic.css
stylesheet_new.css
stylesheet_original.css
these were under classic template
But none of those affected it, however underneath
stylesheet.css in the template_default/css folder it did have one of the attributes I saw on there
it was called
#productAttributes {
margin-left:2em;
}

I messed with this but it had no affect on the page, I have never had these kind of issues, and slmost all of these stylesheets where attached to that page, when I was looking at it.

18 Aug 2006, 12:39 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A few questions

The answer to your second paragraph is that you would need to write a bit of custom code to go into tpl_modules_attributes.php to add your custom links next to the attributes where they are relevant.

The answer to your third paragraph is that the main place where over-rides don't work is the Admin area, but it's unlikely that you would want to be changing that anyway. Otherwise the negative of over-rides is that it is a little more complicated to create and edit additional files. The two huge positives are that when you upgrade Zen Cart you don't wipe out all your custom changes and if you want to uninstall a change, it is often simply a matter of removing the over-ride file.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

18 Aug 2006, 12:53 PM
#11
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A few questions

Since you haven't told me which template you are using and your site is password protected so that I can't see it. I am unable to offer any advice as to which stylesheets you should edit to have your changes take effect.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

18 Aug 2006, 12:57 PM
#13
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

I want to thank you for all the help everything is coming through now, and it would have taken me awhile to discover this system for awhile without your help. I am almost built up enough on knowledge to do the rest, I just have a few more small questions after that.

18 Aug 2006, 2:02 PM
#14
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

Ok I am still trying to figure out just a few things, I still can't find the stylesheet I have made a little headway. The other main thing, is that on the template module attributes page, I see how everything is wired together, where can I find the files that list the attributes out, because with what I have there's no way I can write something custom to show links based on attributes, unless I find a section that lists all the attributes?

18 Aug 2006, 2:15 PM
#15
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

Ok I found the stylesheet finally, it affects the stuff, there are however some problems, I need to figure out how to get a class or id set to the attributes manually, where can the attributes be found, the other thing was the links I have to figure out how to get access to the attributes section to create teh links, I also need to populate the textbox for one of the attributes with a value brought back from the url, where can I find this area?

18 Aug 2006, 2:16 PM
#16
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

Basically what I am saying now, is all I need help with up to this point is where to find files. I know where the page is that displays the attributes to the page, I know where the page is that affects the style now, I Found the proper stylesheet. but I need to find 2 more files, each attribute should be somewhere, because I have to repopulate one of the text fields on one with the information returned from the url, I also need to be able to put a url with it, any advice, file locations or anything would be much appreciated.

18 Aug 2006, 2:21 PM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: A few questions

While I haven't studied what you're trying to do in detail, it sounds to me like you want to mess with a delicate machine, which I don't think is as simple to edit as you anticipate:

/includes/modules/YOURTEMPLATE/attributes.php
(which is a copy of the master from /includes/modules/attributes.php)

and its corresponding template:
/includes/templates/YOURTEMPLATE/templates/tpl_modules_attributes.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Aug 2006, 2:30 PM
#18
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

I completely figured out the styling setup now, I can style anything on any of the pages now, safely, the last thing I need to figure out, any advice, I knew about those 2 pages, that's what I was afraid of, how do I get a specific url, based on what attributes are put there.

18 Aug 2006, 2:30 PM
#19
shiroi avatar

shiroi

New Zenner

Join Date:
Aug 2006
Posts:
5
Plugin Contributions:
0

Re: A few questions

businessman332211:

Ok I am still trying to figure out just a few things, I still can't find the stylesheet I have made a little headway. The other main thing, is that on the template module attributes page, I see how everything is wired together, where can I find the files that list the attributes out, because with what I have there's no way I can write something custom to show links based on attributes, unless I find a section that lists all the attributes?kuroi is away. Maybe I can help.

tpl_modules_attributes is the file that lists out the attributes that you have set up for each product. That's what lines 31 and 32 do.

You have two choices for adding in your links.

  1. you can create an extra field in your product attributes table, and then output that alongside the $options_menu[]

  2. put a switch statement alongside the $options_menu[] echo statement.

Clearly choice 1 would be preferable but a little more difficult.

18 Aug 2006, 2:32 PM
#20
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

In a way, see I just need a way to say, hey if this specific attribute ends up being present, show a link to this page, once I figure this out, he has like 10-15 attribute specific urls he needs to put in, I need advice on this if someone can, I really do appreciate all the help so far, the few people who have pointed me in the right direction helped me unravel(mentally), enough of the system to do what I needed to do so far.