Forums / All Other Contributions/Addons / uri mapping won't work on add to cart botton? help..

uri mapping won't work on add to cart botton? help..

Views: 2,164

Results 1 to 15 of 15
16 Dec 2010, 3:56 AM
#1
bryanblue avatar

bryanblue

New Zenner

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

uri mapping won't work on add to cart botton? help..


Hi everyone, here is my site: https://www.vitabags.com. I have ceon uri mapping installed. everything works fine except for the add to cart bottom in the homepage under the new product for december category. any help would be appreciate. Thanks

Posted last few hours but don't know why the thread was closed..sorry for the duplicate. But i really need help on this one. thanks

16 Dec 2010, 6:49 AM
#2
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: uri mapping won't work on add to cart botton? help..

Your other thread on this matter was closed because the way you posed your question makes it sound as if you are having issues with the Ceon URI Mapping module.. The root of your issue is NOT being caused by the Ceon URI Mapping at all..

I'm not sure how I can explain this any better.. Your Template Monster template is using CUSTOM coding which is causing a conflict with Ceon URI Mapping module.. The issue can't be resolved by fixing the URI Mapping module.. Your issue needs to be resolved by FIXING YOUR TEMPLATE to either correct this custom code to properly use Zen Cart functions or replace this custom code with the default Zen Cart code for the "Add Selected Products to Cart" button..

AGAIN, the cause of your problem is not being caused by Ceon URI Mapping.. Rather this module is ILLUMINATING an issue with your template's custom coding.. Your template's custom code is not playing nicely with Ceon URI Mapping because your template's custom coding needs to be corrected..

DON'T pose your question as if the issue is with Ceon URI Mapping.. Post the TRUE nature of your issue.. I will post your ACTUAL issue once again for you.. (as explained to you by Conor)

Perhaps the community will then be able to help you fix the REAL issue you are having.

You appear to have custom coded "Add to cart" links in your New Products box which is building the URI wrong.

It shouldn't append &action=buy_now but should instead supply action=buy_now as a parameter to the zen_href_link function.

Change the code to do that and you should get working links.Find the fix for your template, and you will fix your problem.. It's really that simple..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

16 Dec 2010, 5:09 PM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: uri mapping won't work on add to cart botton? help..

A little more information for you.. Your new products centerbox is the issue.. Template Monster added those "Add to Cart" links to the products listing, and in doing so came up with their own "special" method.. Fix THAT so it correctly uses the Zen Cart functions and you will resolve your issue.. (and hopefully now that I have posted a more detailed and accurate problem statement, the community will help you out with that..)

I suspect that you need to make whatever the required fix is to ALL the centerboxes (specials, featured products, customers who bought,)

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

16 Dec 2010, 6:03 PM
#4
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

DivaVocals:

A little more information for you.. Your new products centerbox is the issue.. Template Monster added those "Add to Cart" links to the products listing, and in doing so came up with their own "special" method.. Fix THAT so it correctly uses the Zen Cart functions and you will resolve your issue.. (and hopefully now that I have posted a more detailed and accurate problem statement, the community will help you out with that..)

I suspect that you need to make whatever the required fix is to ALL the centerboxes (specials, featured products, customers who bought,)

Thanks for the respon. here is what i found in includes/modules/template28826

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"','text' => ($reval));
//'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);

$col ++;
if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
  $col = 0;
  $row ++;
}
$new_products->MoveNextRandom();

}

if ($new_products->RecordCount() > 0) {
if (isset($new_products_category_id) && $new_products_category_id != 0) {
$category_title = zen_get_categories_name((int)$new_products_category_id);
$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>';
} else {
$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</h2>';
}
$zc_show_new_products = true;

Any thing i should fix in here?

16 Dec 2010, 6:11 PM
#5
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

bryanblue:

Thanks for the respon. here is what i found in includes/modules/template28826

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"','text' => ($reval));
//'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);

$col ++;
if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
  $col = 0;
  $row ++;
}
$new_products->MoveNextRandom();

}

if ($new_products->RecordCount() > 0) {
if (isset($new_products_category_id) && $new_products_category_id != 0) {
$category_title = zen_get_categories_name((int)$new_products_category_id);
$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>';
} else {
$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</h2>';
}
$zc_show_new_products = true;

Any thing i should fix in here?

Above is in the new_products.php

below is in the featured_products.php

$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"','text' => ($reval));

// 'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a><br />' . $products_price);

$col ++;
if ($col > (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS - 1)) {
  $col = 0;
  $row ++;
}
$featured_products->MoveNextRandom();

}

if ($featured_products->RecordCount() > 0) {
if (isset($featured_products_category_id) && $featured_products_category_id !=0) {
$category_title = zen_get_categories_name((int)$featured_products_category_id);
$title = '<h2 class="centerBoxHeading">' . TABLE_HEADING_FEATURED_PRODUCTS . ($category_title != '' ? ' - ' . $category_title : '') . '</h2>';
} else {
$title = '<h2 class="centerBoxHeading">' . TABLE_HEADING_FEATURED_PRODUCTS . '</h2>';
}
$zc_show_featured = true;
}
}
?>

any fix? thanks

16 Dec 2010, 7:06 PM
#6
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: uri mapping won't work on add to cart botton? help..

Suggest using the Developers Toolkit in the store admin and search for "buy_now " to see exactly where Template Monster added this code.. and when posting code in a post PLEASE enclose it in the code shortcodes.. Makes it a LOT easier to read..

BTW.. I don't KNOW if I'll be able to help you.. But I am hoping to get you to the place where you've posted enough of the RIGHT information here so that if there is a kind soul in the community who can help you they know the correct details of your issue..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

16 Dec 2010, 8:04 PM
#7
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

DivaVocals:

Suggest using the Developers Toolkit in the store admin and search for "buy_now " to see exactly where Template Monster added this code.. and when posting code in a post PLEASE enclose it in the code shortcodes.. Makes it a LOT easier to read..

BTW.. I don't KNOW if I'll be able to help you.. But I am hoping to get you to the place where you've posted enough of the RIGHT information here so that if there is a kind soul in the community who can help you they know the correct details of your issue..

hi, i am sorry i didn't know that. here is what i found doing search in with buy_now in the catalog.

includes/classes/shopping_cart.php
includes/functions/functions_general.php
includes/functions/functions_prices.php
includes/init_includes/init_cart_handler.php
includes/languages/english/advanced_search.php
includes/languages/english/advanced_search_result.php
includes/languages/english/button_names.php
includes/languages/english/index.php
includes/main_cart_actions.php
includes/modules/pages/index/main_template_vars.php
includes/modules/product_listing.php
includes/modules/template28826/featured_products.php
includes/modules/template28826/new_products.php
includes/modules/template28826/specials_index.php
includes/templates/template28826/templates/tpl_product_info_display.php
includes/templates/template_default/templates/tpl_document_general_info_display.php
includes/templates/template_default/templates/tpl_document_product_info_display.php
includes/templates/template_default/templates/tpl_modules_products_all_listing.php
includes/templates/template_default/templates/tpl_modules_products_featured_listing.php
includes/templates/template_default/templates/tpl_modules_products_new_listing.php
includes/templates/template_default/templates/tpl_product_free_shipping_info_display.php
includes/templates/template_default/templates/tpl_product_info_display.php
includes/templates/template_default/templates/tpl_product_music_info_display.php
includes/templates/template_default/templates/tpl_product_reviews_default.php
includes/templates/template_default/templates/tpl_product_reviews_info_default.php

below are the php for files which i guess might be the right one:

includes/modules/template28826/featured_products.php

Line #109 : $reval .= " ". "<a href=\"" . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath='. $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '&action=buy_now">' . zen_image_button('button_add_to_cart.gif',BUTTON_ADD_TO_CART_ALT) . '</a>' ; 

includes/modules/template28826/new_products.php

Line #108 : $reval .= " ". "<a href=\"" . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath='. $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '&action=buy_now">' . zen_image_button('button_add_to_cart.gif',BUTTON_ADD_TO_CART_ALT) . '</a>' ; 

If i am wrong, please point out the right files i need to edit. thanks

17 Dec 2010, 5:47 AM
#8
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

anybody? please?

17 Dec 2010, 5:17 PM
#9
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

bryanblue:

hi, i am sorry i didn't know that. here is what i found doing search in with buy_now in the catalog.

includes/classes/shopping_cart.php
includes/functions/functions_general.php
includes/functions/functions_prices.php
includes/init_includes/init_cart_handler.php
includes/languages/english/advanced_search.php
includes/languages/english/advanced_search_result.php
includes/languages/english/button_names.php
includes/languages/english/index.php
includes/main_cart_actions.php
includes/modules/pages/index/main_template_vars.php
includes/modules/product_listing.php
includes/modules/template28826/featured_products.php
includes/modules/template28826/new_products.php
includes/modules/template28826/specials_index.php
includes/templates/template28826/templates/tpl_product_info_display.php
includes/templates/template_default/templates/tpl_document_general_info_display.php
includes/templates/template_default/templates/tpl_document_product_info_display.php
includes/templates/template_default/templates/tpl_modules_products_all_listing.php
includes/templates/template_default/templates/tpl_modules_products_featured_listing.php
includes/templates/template_default/templates/tpl_modules_products_new_listing.php
includes/templates/template_default/templates/tpl_product_free_shipping_info_display.php
includes/templates/template_default/templates/tpl_product_info_display.php
includes/templates/template_default/templates/tpl_product_music_info_display.php
includes/templates/template_default/templates/tpl_product_reviews_default.php
includes/templates/template_default/templates/tpl_product_reviews_info_default.php

below are the php for files which i guess might be the right one:

includes/modules/template28826/featured_products.php

Line #109 : $reval .= " ". "<a href="" . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath='. $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '&action=buy_now">' . zen_image_button('button_add_to_cart.gif',BUTTON_ADD_TO_CART_ALT) . '</a>' ;

> 
> includes/modules/template28826/new_products.php
> ```php
Line #108 : $reval .= " ". "<a href=\"" . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath='. $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '&action=buy_now">' . zen_image_button('button_add_to_cart.gif',BUTTON_ADD_TO_CART_ALT) . '</a>' ; 

If i am wrong, please point out the right files i need to edit. thanks

ok....they fixed for me...here is the fix.
add ```php
zen_get_all_get_params(array('action')) . '&action=buy_now' ) . '">'

17 Dec 2010, 5:23 PM
#10
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: uri mapping won't work on add to cart botton? help..

bryanblue:

ok....they fixed for me...here is the fix.
add ```php
zen_get_all_get_params(array('action')) . '&action=buy_now' ) . '">'

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

17 Dec 2010, 5:51 PM
#11
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

DivaVocals:

I assume "they" is Template Monster???

nope, they are not template monster....but another place where i purchase this template.

17 Dec 2010, 6:22 PM
#12
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: uri mapping won't work on add to cart botton? help..

bryanblue:

nope, they are not template monster....but another place where i purchase this template.Just so you know your template is indeed a Template Monster template.. You may have purchased it from one of the MANY Template Monster affliliates.. (I Googled "template28826" and found your template not only on Template Monster's site but on a LONG list of Template Monster affliate sites as well - price for this template ranged from $68 - $140)

Please be aware that Template Monster templates are WELL KNOWN for their use of non-standard code which can cause a LOT of issues when you install Zen Cart add-ons. While these templates LOOK good, Template Monster templates in general are improperly coded and do not follow Zen Cart's guidelines for template design.. Because of this they are not very well received around here, and you may find it difficult to get assistance on issues that can be traced back to your template being the root cause..

Glad they fixed this for you, but keep in mind that there may be more issues you will encounter as you install other Zen Cart add-ons..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

17 Dec 2010, 7:49 PM
#13
bryanblue avatar

bryanblue

New Zenner

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

Re: uri mapping won't work on add to cart botton? help..

DivaVocals:

Just so you know your template is indeed a Template Monster template.. You may have purchased it from one of the MANY Template Monster affliliates.. (I Googled "template28826" and found your template not only on Template Monster's site but on a LONG list of Template Monster affliate sites as well - price for this template ranged from $68 - $140)

Please be aware that Template Monster templates are WELL KNOWN for their use of non-standard code which can cause a LOT of issues when you install Zen Cart add-ons. While these templates LOOK good, Template Monster templates in general are improperly coded and do not follow Zen Cart's guidelines for template design.. Because of this they are not very well received around here, and you may find it difficult to get assistance on issues that can be traced back to your template being the root cause..

Glad they fixed this for you, but keep in mind that there may be more issues you will encounter as you install other Zen Cart add-ons..

Thanks for telling me all this. i did get LOTS of trouble putting add-on to this site....good thing they fixed for me so far. Hopefully there will be templates that looks good and follow Zen Cart's guidelines coming out. Once again thanks for all the information.

17 Dec 2010, 8:17 PM
#14
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: uri mapping won't work on add to cart botton? help..

There already good looking templates which follow Zen Cart standards..There are a bunch of new designers who have contributed some of their free offerings here. But if you are referring to a desire for a prettier template to come with Zen Cart.. I know that folks ask about this a LOT.. Frankly speaking I would rather that the continue on the path they always have.. Providing a good solid solution.. Making it pretty really is the easy part in comparison.. Functionality and security are the most important features.. let the designers focus on templates..

Anyway.. wish you luck with your site> bryanblue:

Thanks for telling me all this. i did get LOTS of trouble putting add-on to this site....good thing they fixed for me so far. Hopefully there will be templates that looks good and follow Zen Cart's guidelines coming out. Once again thanks for all the information.
Posted via Mobile Device

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

25 Jan 2011, 2:27 AM
#15
britneycook avatar

britneycook

New Zenner

Join Date:
Oct 2010
Posts:
53
Plugin Contributions:
0

Re: uri mapping won't work on add to cart botton? help..

have the same issue with my template.

bryanblue:

ok....they fixed for me...here is the fix.
add ```php
zen_get_all_get_params(array('action')) . '&action=buy_now' ) . '">'


Where in the code do you add this? Does it replace a whole line or added to the beginning/end of the code?