Jump to content

ecartz

♥Ambassador
  • Content count

    3,316
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by ecartz

  1. ecartz

    Better Product Preview with Lightbox 2

    document.write('<?php echo '<a href="' . DIR_WS_IMAGES . $review['products_image'] . '" rel="lightbox" title="' . addslashes($review['products_name']) . '">' . tep_image(DIR_WS_IMAGES . $review['products_image'], addslashes($review['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
  2. ecartz

    Free shipping module and Coupon module

    I have the impression that the order of the order total modules matters. If you go into the order total section in admin and change the sort order so that coupons are before shipping, it might fix your problem.
  3. ecartz

    Better Product Preview with Lightbox 2

    Try changing (in the code I posted previously) '" rel="lightbox" title="' . $product_info['products_name'] . '">' to '" rel="lightbox" title="' . addslashes($product_info['products_name']) . '">' I think that this is a bug in the contribution and that everyone who has apostrophes in their titles will encounter it (not just your modified version).
  4. ecartz

    Header Tags SEO

    'categories_description_front' => tep_db_prepare_input ($categories_description_front_array[$language_id] ); // End Categories images box /*** Begin Header Tags SEO ***/ $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]), I think that the first line should be last, like this (also changed a semicolon to a comma): // End Categories images box /*** Begin Header Tags SEO ***/ $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]), 'categories_description_front' => tep_db_prepare_input($categories_description_front_array[$language_id] ), Don't forget to backup before you try it.
  5. ecartz

    DIV-based template?

    I haven't looked at it in a while, but one of the things that Paul Mathot was doing with the Basic Template Structure contribution was building a CSS/div based template. Even if you don't want to install the contribution, you could still use the template as a guide.
  6. ecartz

    Better Product Preview with Lightbox 2

    So you just want to know how to replace document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE_EXTRA, 'pID='.$product_info['products_id']).'&id='.$nb.'\\\')">'. tep_image(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); ? It looks like it would be document.write('<?php echo '<a href="' . DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image] . '" rel="lightbox" title="' . $product_info['products_name'] . '">' . tep_image(DIR_WS_IMAGES_EXTRA . $product_info[$var_products_image], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); I did not test nor download the contribution, so don't forget to backup before trying.
  7. ecartz

    Need Add-On at check out

    I don't know of a contribution that does it at checkout, but the Option Types v2 contribution allows file uploads and selection from previous uploads on the product_info page (before adding to cart).
  8. ecartz

    Page Cache v1.5 - MS2 - Issues

    PHP code? All I see that is different in what you posted is something that looks like the output from print_r on the page cache variable or $GLOBALS or something.
  9. As I recall, 2.2 Milestone 2 was out in 2003. In 2008, the 2.2 release candidate came out. Therefore, I would agree that it does not make sense to restrict the new alpha release to anything but the latest PHP. PHP 5.2 support in Red Hat will probably be here before the release candidate for 3.0 (which admittedly is farther along than 2.2 was at milestone 2). From the other side, I think that 2.2 should be supported (security fixes) until both 3.0 is a release candidate and Red Hat has approved 5.2. That way, people won't be forced to migrate hosts to do required security upgrades of their store. While that will pull some resources away from new development, it will make things easier for the community. Store owners who agree with that position might find that the project would be more supportive of it if they mention this when they send their donations. Of course, that only works for store owners who donate to the project... (Hint, hint.)
  10. The default language currency for English is US dollars, which is not what the poster wanted. If anything, they'd want to set it to false. From includes/languages/english.php: // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, // instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'USD'); The robust solution to this problem would be to change the last line to define('LANGUAGE_CURRENCY', 'EUR');
  11. ecartz

    LOOKING FOR CONTRIBUTION

    I'm not sure that I entirely understand your requirements. It sounds like you want either QT Pro (which adds inventory tracking to the existing Product Attributes feature) or something like Master Products, which shows multiple products on the same page.
  12. No, once you ask, it's best to keep in a single thread. Plus, it looks like a moderator moved the thread for you. If you're going to try the coding yourself, you can look at products_image and products_weight for comparable fields. MSRP should work similarly to those.
  13. This is probably the wrong forum (you are talking about Easy Populate, which is a 2.2 contribution), but what you want is only possible by editing the code of Easy Populate. There is no automated way to add columns.
  14. ecartz

    Cool Flash Carousel Menu

    You are missing a line from includes/database_tables.php -- something like define('TABLE_FLASH_CAROUSEL', 'flash_carousel'); I'm not sure about the flash_carousel. It would be whatever the name of the table that you added to the database is. I would advise reading through the contribution again and see if you might have missed a step. If that doesn't work, you'll have to try to find the name of the table in the SQL that it has you run.
  15. ecartz

    QPBPP_V1_3_5 Installation pb

    I haven't used this contribution recently, but in line 266, I see $pfs and on lines 265 and 269, I see $pf. Since the error is on 266, I would guess that $pf is correct and $pfs is a typo.
  16. ecartz

    Returning to OSC after paypal payment

    The PayPal IPN contribution solves this by communicating with PayPal directly and not relying on PayPal to send the user back to the shop. It is more complicated than the regular PayPal contribution but it is also more reliable.
  17. ecartz

    contribution downloads

    It should just work. Which contribution is it?
  18. ecartz

    Ourproducts

    That's the correct value if you want Onze prodcuten to appear where Our Products does now. Are you sure that you are using the right file? The result that you are getting (where you see TABLE_HEADING_OUR_PRODUCTS instead of Our Products or Onze prodcuten) is a bug. It's saying that it is not finding the define at all. This could happen if, for example, you put the code in includes/languages/english.php instead of includes/languages/dutch.php when the store was using Dutch. Another thing to verify is that there isn't a syntax error higher in the file that is keeping this line from being read properly (to rule this out, move the whole line to be the first define in the file). Make sure that TABLE_HEADING_OUR_PRODUCTS is spelled the same way everywhere that it is used.
  19. Look under About Us and you will find The osCommerce Team. All those people are experienced developers.
  20. Oh? Is there a FreeSQL, OpenSQL, or SQL.org coming out? Even if there isn't, if Oracle (assuming it passes the anti-trust hurdles, as is likely) tries to cripple MySQL, then there always could be. It is a GPLed application after all.
  21. I think that to get the weight and price to update, in the javascript, change <script language="JavaScript1.2"> function check(checkboxid) { document.getElementById(checkboxid).checked = "checked"; } function changeQuantity(i,qty) { var quantity = Number(document.cart_quantity['qty_'+i].value)-qty; if (quantity <= 0) { quantity = 0; check('checkbox['+i+']'); } document.cart_quantity['qty_'+i].value = quantity; } </script> to <script type="text/javascript"> function updateCart(id, quantity, old_quantity) { var product_price = document.getElementById('product_price_'+id).value; var product_total_price = quantity * product_price; var old_product_total_price = old_quantity * product_price; var product_weight = document.getElementById('product_weight_'+id).value; var product_total_weight = quantity * product_weight; var old_product_total_weight = old_quantity * product_weight; var old_total_weight = document.getElementById('total_weight').innerHTML; var new_total_weight = old_total_weight + product_total_weight - old_product_total_weight; var old_sub_total_price = document.getElementById('sub_total_price').value; var new_sub_total_price = old_sub_total_price + product_total_price - old_product_total_price; var currency_symbol_left = document.getElementById('currency_symbol_left').value; var currency_symbol_right = document.getElementById('currency_symbol_right').value; var currency_decimal_places = Number(document.getElementById('currency_decimal_places').value); var sub_total_display = currency_symbol_left+new_sub_total_price.toFixed(currency_decimal_places)+currency_symbol_right; var product_price_display = currency_symbol_left+product_total_price.toFixed(currency_decimal_places)+currency_symbol_right; document.getElementById('product_total_weight_'+id).innerHTML = product_total_weight; document.getElementById('product_total_price_'+id).innerHTML = product_price_display; document.getElementById('total_weight').innerHTML = new_total_weight; document.getElementById('sub_total_price').innerHTML = sub_total_display; } function changeQuantity(id,qty) { var old_quantity = Number(document.cart_quantity['qty_'+id].value); var quantity = old_quantity+qty; if (quantity < 1) { quantity = 1; } if (quantity != old_quantity) { updateCart(id, quantity, old_quantity); } document.cart_quantity['qty_'+id].value = quantity; } </script> Change $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ($products_weight * $products[$i]['quantity']) . WEIGHT_SINGULAR_MEASURE); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); } to $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => '<span id="product_total_weight_' . $products[$i]['id'] . '">' . ($products_weight * $products[$i]['quantity']) . '</span>' . WEIGHT_SINGULAR_MEASURE) . tep_draw_hidden_field('product_weight_' . $products[$i]['id'], $products_weight); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<b id="product_total_price_' . $products[$i]['id'] . '">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>' . tep_draw_hidden_field('product_price_' . $products[$i]['id'], $currencies->calculate_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']))); } Also find // END estimated shipping ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php if (SHIPPING_BOX_WEIGHT >= $cart->show_weight()*SHIPPING_BOX_PADDING/100) { $estimated_shipping_weight = $cart->show_weight()+SHIPPING_BOX_WEIGHT; } else { $estimated_shipping_weight = $cart->show_weight() + ($cart->show_weight()*SHIPPING_BOX_PADDING/100); } echo PACKAGE_WEIGHT . $estimated_shipping_weight . ($estimated_shipping_weight == "1" ? WEIGHT_SINGULAR_MEASURE : WEIGHT_MULTIPLE_MEASURE); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b> </td> </tr> and change to // END estimated shipping ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php if (SHIPPING_BOX_WEIGHT >= $cart->show_weight()*SHIPPING_BOX_PADDING/100) { $estimated_shipping_weight = $cart->show_weight()+SHIPPING_BOX_WEIGHT; } else { $estimated_shipping_weight = $cart->show_weight() + ($cart->show_weight()*SHIPPING_BOX_PADDING/100); } echo PACKAGE_WEIGHT . '<span id="total_weight">' . $estimated_shipping_weight . '</span>' . ($estimated_shipping_weight == "1" ? WEIGHT_SINGULAR_MEASURE : WEIGHT_MULTIPLE_MEASURE); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <span id="sub_total_display"><?php echo $currencies->format($cart->show_total()); ?></span></b><?php echo tep_draw_hidden_field('currency_symbol_left', $currencies->currencies[$currency]['symbol_left']) . tep_draw_hidden_field('sub_total_price', $cart->show_total()) . tep_draw_hidden_field('currency_symbol_right', $currencies->currencies[$currency]['symbol_right']) . tep_draw_hidden_field('currency_decimal_places', $currencies->currencies[$currency]['decimal_places']); ?> </td> </tr> This is at least close to what the solution should be. By the way, I changed the minimum quantity from zero to one to match the original contribution's behavior. I wonder if the original contribution works with product attributes? They produce weird product IDs.
  22. I have the wrong sign in the update quantity function. It currently says var quantity = Number(document.cart_quantity['qty_'+i].value)-qty; It should say var quantity = Number(document.cart_quantity['qty_'+i].value)+qty; The plus button was subtracting and the minus button was adding. There's also an issue with the remove box. What should the behavior be when the remove box is checked but the customer hits the add quantity button? What if they decrease the quantity? A simple solution might be to remove the check('checkbox['+i+']'); line. That would at least fix the problem of the remove box getting set. Wouldn't fix the problem of the customer adjusting the quantity after clicking the remove box.
  23. It's this line: $minus_field = '<a href="java script:changeQuantity("'.$products[$i]['id'].'",-1)">'.tep_image(DIR_WS_IMAGES .'minusBtn.gif').'</a>'; javascript should be one word, not two (java script). Not sure how that got there. I don't remember doing anything but copy and past that line. It's definitely in what I posted (both original and modified versions) and not in the original contribution. I would like to claim that the forum must have done it on its own. I'm going to try it again. This time I'll make sure that it isn't there when I submit: $minus_field = '<a href="java script:changeQuantity("'.$products[$i]['id'].'",-1)">'.tep_image(DIR_WS_IMAGES .'minusBtn.gif').'</a>'; Nope, I can see just from the preview that the forum software added a space again. Not in the box where I'm typing now though. The same thing happened with the plus button, so you'll need to delete both spaces.
  24. Is there a link to your store floating around? When you say the next page, do you mean the reload of the shopping cart page or a different page? On which link or button are you clicking?
  25. To get most of what you want, you could change the fast update contribution, the section of code that currently says: <script type="text/javascript"> function UpdateCartQuantity() { document.cart_quantity.submit(); } function changeQuantity(i,qty) { document.cart_quantity['qty_'+i].value = Number(document.cart_quantity['qty_'+i].value)+Number(qty); UpdateCartQuantity(); } function confSubmit(form) { if (confirm("Are you sure you want to delete this item?")) { form.submit(); } else { alert("You decided to not delete the item."); } } function check(checkboxid) { document.getElementById(checkboxid).checked = "checked"; } </script> to say <script language="JavaScript1.2"> function check(checkboxid) { document.getElementById(checkboxid).checked = "checked"; } function changeQuantity(i,qty) { var quantity = Number(document.cart_quantity['qty_'+i].value)-qty; if (quantity <= 0) { quantity = 0; check('checkbox['+i+']'); } document.cart_quantity['qty_'+i].value = quantity; } </script> and 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], '', 'onClick="confSubmit(this.form);" id="checkbox['.$products[$i]['id'].']"')); to say 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], '', 'id="checkbox['.$products[$i]['id'].']"')); and if ($products[$i]['quantity']==1) { $minus_field = tep_image(DIR_WS_IMAGES . 'minusBtn.gif', IMAGE_BUTTON_REMOVE_PRODUCT, '', '', 'onclick="java script:check(\'checkbox['.$products[$i]['id'].']\'); java script:document.cart_quantity.submit();"'); } else { $minus_field = '<a href="java script:changeQuantity("'.$products[$i]['id'].'",-1)">'.tep_image(DIR_WS_IMAGES .'minusBtn.gif').'</a>'; } $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" nowrap valign="top"', 'text' => $minus_field . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onChange="UpdateCartQuantity();" id="qty_'.$products[$i]['id'].'"').'<a href="java script:changeQuantity("'.$products[$i]['id'].'", 1)">'.tep_image(DIR_WS_IMAGES .'plusBtn.gif').'</a>'. tep_draw_hidden_field('products_id[]', $products[$i]['id'])); to instead say: $minus_field = '<a href="java script:changeQuantity("'.$products[$i]['id'].'",-1)">'.tep_image(DIR_WS_IMAGES .'minusBtn.gif').'</a>'; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" nowrap valign="top"', 'text' => $minus_field . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onChange="UpdateCartQuantity();" id="qty_'.$products[$i]['id'].'"').'<a href="java script:changeQuantity("'.$products[$i]['id'].'", 1)">'.tep_image(DIR_WS_IMAGES .'plusBtn.gif').'</a>'. tep_draw_hidden_field('products_id[]', $products[$i]['id'])); What this would give you would be a shopping cart page where you could update the quantity by clicking on the plus or minus buttons. The page would only refresh when you clicked update cart. There is a slight regression in the delete functionality, as it will only update the cart when you click update cart (previously updated when you clicked the checkbox). The next step, if you want to take it, would be to build a true AJAX request handler (what this and the plus/minus contribution does is just javascript DOM manipulation, not actual AJAX) to handle the remove from cart action. This would require making a new page called something like remove_product_from_cart.php that would generate an XML response on success or failure. You could then use some basic javascript DOM manipulation (like at http://w3schools.com/js/tryit.asp?filename...table_deleterow ) to remove the product from the page if successful. To learn more about AJAX, you could check out http://w3schools.com/ajax/default.asp
×