Zen Cart Logo
Forums / General Questions / Can't figure out how to move a link.

Can't figure out how to move a link.

Views: 738

Results 1 to 6 of 6
13 Jun 2014, 2:11 AM
#1
designing4 avatar

designing4

New Zenner

Join Date:
May 2014
Location:
Charleston, West Virginia, United States
Posts:
20
Plugin Contributions:
0

Can't figure out how to move a link.

I installed a mod to the product listing page to change how it displays. I just want to move the "...more info" link to display under the listing description. I have tried and tried and can't figure it out! Help!

Here is a link to the page... its still under testing on the website and so isn't really "public".

http://healthyrestmattress.com/shop/index.php?main_page=index&cPath=1

13 Jun 2014, 7:02 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can't figure out how to move a link.

designing4:

I installed a mod to the product listing page to change how it displays. I just want to move the "...more info" link to display under the listing description. I have tried and tried and can't figure it out! Help!

As much as we'd like to help, there isn't really anything we can tell you unless we know what mod it was that you installed. The reason being is that to do this you'll be needing to modify the mod, so someone is going to have to take a look at the code itself in order to figure out exactly what change is needed.

Cheers
RodG

13 Jun 2014, 9:30 PM
#3
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,795
Plugin Contributions:
22

Re: Can't figure out how to move a link.

Actually, it shouldn't be SUCH a big problem.

You'll need to edit your includes/modules/classic/product_listing.php (if you don't have that file, then it's in includes/modules/product_listing.php).

Find:

$lc_button = '<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

and comment it out (just add two slashes before $lc_button).

Then, find:

<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>

and replace with:

<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div><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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>

Be EXTRA careful because I pasted only a part of the line so make sure you don't remove or add any apostrophes as it might break your site. The entire line should start like this:

$lc_text = '<h3 class="itemTitle"><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']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';

and after you change it, should be like this:

$lc_text = '<h3 class="itemTitle"><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']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div><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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
14 Jun 2014, 1:03 AM
#4
designing4 avatar

designing4

New Zenner

Join Date:
May 2014
Location:
Charleston, West Virginia, United States
Posts:
20
Plugin Contributions:
0

Re: Can't figure out how to move a link.

Thanks balihr
I did what you said and the "more info" link removed from above the "free shipping" icon (although there is a still a big empty gap there), but it didn't move the "more info" to display under the listing description.

I used the column_layout_grid_2_3_1 mod.

14 Jun 2014, 1:18 AM
#5
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,795
Plugin Contributions:
22

Re: Can't figure out how to move a link.

Well, I'm pretty sure you've missed something (quite) simple, but, as Rod had said, it's hard to tell what without seeing the file in question. Try going over it once more, you've probably missed something on the second step...

14 Jun 2014, 1:56 AM
#6
designing4 avatar

designing4

New Zenner

Join Date:
May 2014
Location:
Charleston, West Virginia, United States
Posts:
20
Plugin Contributions:
0

Re: Can't figure out how to move a link.

You were right. Thank you ! Looks much better now.