heinerprahm Posted January 3, 2005 Posted January 3, 2005 I am using a contribution for Master Slave Products in a MP3 Download Shop. This shop is a 100 % Clon of a working system, just the server pathes have been changed. This shop allows user to buy either the complete album, or just selected tracks. All this features are included in the product_info.php. On the new server the shop was also working pretty fine, but it was not possible to send artikels to the shopping_cart.php. The basket remains empty. So I was locking around and found a work around for this problem by replacing this code inside the applikation_top.php: /* //Master Products // customer adds multiple products from the master_listing page case 'add_slave' : while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { if (substr($key,0,11) == "Qty_ProdId_") { $prodId = substr($key,11); $qty = $val; if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) { // We have attributes $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]); } else { // No attributes $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty); } } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; //Master Products EOF */ to this code ... //Master Products // customer adds multiple products from the master_listing page case 'add_slave' : foreach ($HTTP_POST_VARS as $keyA => $valueA) { if (substr($keyA,0,11) == "Qty_ProdId_") { $prodId = substr($keyA,11); if ($valueA <= 0 ) continue; $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($valueA), $HTTP_POST_VARS['id']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; //Master Products EOF Afterwards send articles to the basket was fully functional, but then another problem appeared. I was able to buy the product, but unfortunaty the system was not able to register the article as "virtual" and downloadable and the whole download funktion was out of order. I have tried to fix some thinks, for example replaced the modified product_info.php with the original from the Master/Slave contrib an then downloading was possible, but all features where gone. So maybe someone has the same problem and can advice me how to fix it. Thanks in advance. Heiner Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.