Forums / Templates, Stylesheets, Page Layout / Help with "Add to cart box", a font change and "New Produts Module"...

Help with "Add to cart box", a font change and "New Produts Module"...

Locked

Views: 1,892

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
4 Dec 2009, 9:52 PM
#1
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Help with "Add to cart box", a font change and "New Produts Module"...

In the product listings, I would like moved the "add to cart" box out from under the price and give it it's own column, but I definitely want to keep it on there. Is this possible?

If I could make the text for the whole site bigger and make it all Arial, that would help tremendously.

Also, I have been struggling with getting rid of the "New Products for December" box at the bottom of every page which I know is the New Products Module. I found out how to take the products out of it by changing the 9 to a 0 in the admin>product listings tab, but can't get the top blue bar to go away. Any thoughts?

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

5 Dec 2009, 1:48 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Help with "Add to cart box", a font change and "New Produts Module"...

A little work in /includes/modules/your_template/product_listing.php can give you class tags for the parts of the price/add column, and then making that column wide enough and styling the elements in your stylesheet can give the layout you want. I don't think a separate title for an "Add to Cart" column is useful.

The font size/style for the overall site is set in the body{ rule at the top of your stylesheet.

You can organize the centerboxes for each kind of page in
Configuration > Index Listing > Show New Products in xxx Page

5 Dec 2009, 2:47 AM
#3
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with "Add to cart box", a font change and "New Produts Module"...

Well, I got the New Products module off of all of the pages. I thank you for that.

I tried last night to change the font style and size and did not see any noticeable changes. The font size was set at 62.5% and I made it 100% and saw no change. I have figured out how to change some of the fonts when I write info in HTML boxes, but not the fonts in the sideboxes or any of the other letters that are not in HTML boxes. Not sure if I am just doing something wrong or not. It is not a big deal. The breadcrumb for where this magical stylesheet everyone is talking about might be helpful in case I am looking at the wrong one so if you know it, that may solve some issues. That would not surprise me at all being that I am not a code writer or script writer in any way, just a normal person trying to find a way.

Now, for the add to cart box. What you typed was just super way above my head. I found the file, even though the "your_template" part threw me off a little. After seeing what is in that page, I have no idea at all what I would need change or add or whatever would need to be done. It is not a big deal, we can just leave that alone.

Thanks to gjh42 and all of the other folks at Zen Cart that have helped me out. It is really making things look alot better on my site!

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

5 Dec 2009, 5:39 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Help with "Add to cart box", a font change and "New Produts Module"...

The stylesheet to edit should be at /includes/templates/your_template/css/stylesheet.css. "your_template" is a placeholder for your custom template name, whether you downloaded and installed a template, or are building your own from scratch or from the /classic/ template. A link to see your site live would let us give more accurate advice.

If you don't know about making a template yet, read the tutorials on templates and overrides before doing more customization.
Wherever you are changing font sizes, it will have no overall lasting effect unless you change it in the stylesheet.

5 Dec 2009, 6:19 AM
#5
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with "Add to cart box", a font change and "New Produts Module"...

Here is a link to the site:

https://www.benhamcollectibles.com/shop

I guess I could put this link in my signature, couldn't I? I am not a pro at this stuff. Alot of people on here asking questions already know a little bit about what is going on here. I need it to be explained to me like I am 6 years old. I have zero knowledge of script or code or files. I just learned what I do know from looking over the shoulder of someone doing stuff for me that did know how. He isn't around now because I moved, so I gotta find another way or not have a store. I tell you all of this so you understand that I am stupid when it comes to this stuff. You are the experts and I ride the "code" little bus. I do understand that if I change some code and it doesn't work, I change it right back and save it again.

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

5 Dec 2009, 8:08 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Help with "Add to cart box", a font change and "New Produts Module"...

There are a few tools that will make your life easier when customizing your site. If you don't have them already, install an FTP program like Filezilla and a file editing program like Notepad++ (both free from https://www.sourceforge.net). (Notepad is not the same as Notepad++.)

You should have a full set of Zen Cart files on your home computer. If you make edits to those copies and then send them to your site, you will always have an up-to-date backup.

Open /includes/modules/product_listing.php, and save as /includes/modules/your_template/product_listing.php. Then find this section around line 146```php
$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

    break;
    case 'PRODUCT_LIST_QUANTITY':
Replace <br /> in one place with
<div class="listingAdd"> 
and add
$lc_text .= '</div>';
to get```php
        $lc_text .= '<div class="listingAdd">' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
        $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
        $lc_text .= '</div>';

Now you have a handle to move the add/qty box with.
Add to your stylesheet```
.listingAdd {
float: right;
width: 4.0em;
}

5 Dec 2009, 4:24 PM
#7
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with "Add to cart box", a font change and "New Produts Module"...

Well, you were right. I messed something up and now my prices are gone from the live site. I must have done it last night before going to bed. I was tired and kept focusing on the code so much that I am sure I left something in that I need to take out. Not sure what though. Any ideas what controls the price column?

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com