What file or action causes attributes to be added to cart
Working on upgrading a 1.3.9h to 1.5.1 site
Merged custom files into 1.5.1 versions
This site has custom code that displays attributes on the product listing page
In the 1.3.9h site adding to cart from the product listing page yields a correct add to cart with correct price
In the 1.5.1 site - adding to cart from the product listing page yields a product added BUT $0.00 as the cost
Modifications originally were added to the column-grid product listing plugin
No other plugins except for this custom code which is not a plugin available
Relevent code block change in /includes/modules/product_listing.php
Code:
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_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);
require($template->get_template_dir('/tpl_modules_attributes_listing.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes_listing.php');
$lc_text .= '</div>' ;
} else {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . '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);
require($template->get_template_dir('/tpl_modules_attributes_listing.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes_listing.php');
$lc_text .= '</div>' ;
Can provide additional data if I knew what to provide
Re: What file or action causes attributes to be added to cart
The shopping cart class processes submitted POST parameters and adds the products and selected attributes to the cart, and is triggered by the main_cart_actions.php and extra_cart_actions folder scripts if any. Of course that all depends on the submitted FORM containing all the correct fields and values, so templates must be working properly too (valid HTML, not incorrectly nested, etc).
Re: What file or action causes attributes to be added to cart
Thank you for your response
Exactly where is the file main_cart_actions.php
Re: What file or action causes attributes to be added to cart
Last time I looked it was in the /includes/ folder.
Re: What file or action causes attributes to be added to cart
Duh!!! directly under /includes - - - I was looking in folders
Very little difference between 1.3.9h and 1.5.1
There are no extra_cart_actions files