Topic RSS
5:10 pm
October 8, 2011
OfflineJust finished the first Market Theme site for a local business that sells customized kids clothing. It offers various designs with custom embroidery. I had to modify a few of theme's .php files to support for item variations, such as "Type of Embroidery" drop-down, "Name or Initial" input box, "Matching Items" drop-down, "Sleeve Length" choice. I also made changes to single.php to allow to enter and view comments on a single-view item page.
The Item Categories also display the number of items offered for each category.
Here's the link to the site:
Hi LGD, your market site looks & works great! I noticed you were successful adding the "Name or Initial" input box. I too use the market theme and customized single.php for an input box, however, i can't get my field name to show in my cart, only the input value. Can you share how you were able to transfer your "Name or Initial" field name along with the field value to your cart? Any insight you can give is greatly appreciated!
2:01 am
October 8, 2011
OfflineHi!
If you look at single.php file and notice how other form fields are processed, you'll see that each field, whether it's a drop-down box or input field, have associated HIDDEN input name, which are all named 'on1', 'on2', etc., and the VALUE of those hidden fields (defined in english.php), is exactly what you'll see in the shopping cart as option name. It is VERY IMPORTANT to give your input (or select) field the ID that will be 'os' followed by the SAME number as the corresponding HIDDEN field. The code, that processes the shopping cart (cart.php) will look for this, and if this is not done properly, you won't see your field displayed there.
For example, here's how my name-or initial field looks in single.php (notice the use of name='on4' on hidden input and id='os4' on the input field). The mkt_THEME_SINGLE_LABEL_INITIALS is defiled in english.pho as "Name or Initials", and that's what you'll se in your shopping cart.
<tr>
<?php echo '<td><input type="hidden" name="on4" value="'.mkt_THEME_SINGLE_LABEL_INITIALS.'"/>'.mkt_THEME_SINGLE_LABEL_INITIALS.':<a title="'.mkt_THEME_SINGLE_LABEL_INITIALS_ENTER_INSTRUCTIONS.'"></br>(Hover for Details)</a></td>
<td><input type="text" class="field" id="os4" name="os4" cols="4"></td>'; ?>
</tr>
I hope that'll help,
Anna
Most Users Ever Online: 40
Currently Online:
15 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Member Stats:
Guest Posters: 428
Members: 2252
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 2983
Posts: 16042
Newest Members: Allsed, deleteduser, shanm, slidesketch, jimharrison, vmi
Moderators: Market Admin (5051)
Administrators: Market Admin (5051)

Log In
Register
Home



