Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Showing attribute options to users

Showing attribute options to users

Locked

Views: 709

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
20 Aug 2009, 4:06 AM
#1
mercury049 avatar

mercury049

New Zenner

Join Date:
Jul 2009
Posts:
5
Plugin Contributions:
0

Showing attribute options to users

I've got a fairly configured site going and I'm down to the final details now. I've hit a small snag though. When the user orders something from me they will have an option of fonts to select from. But how will they know what a font looks like without an example? So I've created and EZ page that has a listing of the fonts and what they look like. I know how to put links to it and all, but my question is this. How can I only show a link to it near the attributes on pages that have the font option? It wouldn't make sense to show them the font page link if they don't have to pick a font. Am I going about this the right way? I've reviewed the ability to attach a picture to a font option, but I don't think that's a good fit as there are hundreds of fonts to choose from and I don't want it to load all of that content on the main order page. Thoughts, opinions, ideas?

TIA

20 Aug 2009, 12:03 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Showing attribute options to users

Use the option comment and put the link in there :smile:

You can adjust where the option comment appears with a bit of css.

20 Aug 2009, 12:05 PM
#3
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Showing attribute options to users

Having said that how does your EZ page work?

I guess it has graphic images of the fonts (ie jpgs, gifs or pngs) If it uses the fonts themselves then this just won't display properly on some machines. Just a thought.

But as another thought if this is the case and you have images of what the fonts look like why not use them as attribute images?

20 Aug 2009, 5:00 PM
#4
mercury049 avatar

mercury049

New Zenner

Join Date:
Jul 2009
Posts:
5
Plugin Contributions:
0

Re: Showing attribute options to users

There would be just WAY too many of them to use as attribute images. Yes, they're jpg's of what the fonts look like. But the attribute comment idea might be just the ticket. I'll check it. Thanks

20 Aug 2009, 6:57 PM
#5
mercury049 avatar

mercury049

New Zenner

Join Date:
Jul 2009
Posts:
5
Plugin Contributions:
0

Re: Showing attribute options to users

Well, I would like for that comment to be a link. I put in <a href> form and got it to work, but I have a problem. It limits how many characters that will show in that comment field. So I can only get so many in there. Anyone know how I could extend that limit?

Thanks

20 Aug 2009, 9:19 PM
#6
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Showing attribute options to users

Well the database has a limit of 64 characters as default. And it looks like the entry in admin has a limit of 64 characters so you don't attempt to load in too many characters to the database.

You could alter the database to allow more characters and edit the admin files so as to increase the limit correspondingly.

Hmm, maybe there is a quicker way...

Give me a moment....

20 Aug 2009, 9:37 PM
#7
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Showing attribute options to users

Find a file called tpl_modules_attributes.php (includes/templates/yourtemplate/templates/) and look for the bit that is like this:

<div class="wrapperAttribsOptions">

<h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>

<div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>

<br class="clearBoth" />

</div>

Now you want to add a bit in so you get:

<div class="wrapperAttribsOptions">

<h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>

<p class="optionLink"> 
<?php if ($options_name[$i]=='Color'){
echo'put the link here';
};
?>


<div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>

<br class="clearBoth" />

</div>

You need to adjust the word 'Color' to match the name of your font option. Check it is working at this point by uploading. You should see the words 'Put the link here' where the link should go. If you see nothing it might be because you have got the option name wrong (caps maybe)

Then you can put your link instead of the words 'Put the link here'. Use double quotes in your link rather than single quotes so as not to confuse the php pixies. So that line might read:

echo'<a href="../Desktop/Mango 
Sailing/Calendar_mar.htm">
<img src="../images/aldos daves 319.jpg">
</a>';

But obviously with your own images and paths:smile: