Jump to content

virtualink

♥Ambassador
  • Content count

    29
  • Joined

  • Last visited

1 Follower

About virtualink

  • Birthday 01/01/2006

Profile Information

  • Real Name
    LC
  • Location
    Hawaii
  • Website

Recent Profile Visitors

2,278 profile views
  1. virtualink

    Quantity Price Breaks Per Product

    I am trying to incorporate MSRP Display Price & Percentage into my system which already has Quantity Price Breaks Per Product installed. Since PriceFormatter.php replaced code in product_info.php, I am stuck. The MSRP code was designed to replace the same code which was removed by Quantity Price Breaks. Example: /* REPLACED by Quantity Price Break per Product V-1.11.2_1 if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = 'Regular Price: <s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice"><br>Special Price: ' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = 'Your Price: <font color ="#FF0000">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</font>'; } */ // BEGIN Quantity Price Break per Product V-1.11.2_1 $pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id); $products_price=$pf->getPriceString(); // END Quantity Price Break per Product I am supposed to replace the "original" product_info.php code with the following MSRP code: $products_price = '<table class="PriceList" border="0" width="100%" cellspacing="0" cellpadding="0">'; $new_price = tep_get_products_special_price($product_info['products_id']); if ($product_info['products_msrp'] > $product_info['products_price']) $products_price .= '<tr><td>' . TEXT_PRODUCTS_MSRP . '</td><td class="oldPrice" align="right">' . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; $products_price .= '<tr><td>' . TEXT_PRODUCTS_OUR_PRICE . '</td>'; if ($new_price != '') {$products_price .= '<td class="oldPrice"';} else {$products_price .= '<td';} $products_price .= ' align=right>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') {$products_price .= '<tr class="productSpecialPrice"><td>' . TEXT_PRODUCTS_SALE . '</td><td align=right>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';} if ($product_info['products_msrp'] > $product_info['products_price']) {if ($new_price != '') {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] - $new_price) , tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_msrp'] - $new_price) / $product_info['products_msrp']) * 100) . '% )</td></tr>';} else {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] - $product_info['products_price']) , tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_msrp'] - $product_info['products_price']) / $product_info['products_msrp']) * 100) . '% )</td></tr>';}} else {if ($new_price != '') {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_price'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_price'] - $new_price) / $product_info['products_price']) * 100) . '% )</td></tr>';}} $products_price .= '</table>'; Any help would be very much appreciated!!
  2. I am trying to incorporate the MSRP Display Price & Percentage into my system which has Quantity Price Breaks Per Product installed. Quantity Price Breaks replaced some code in my existing product_info.php file and references a new file titled PriceFormatter.php located in /includes/classes/. I would like help as to how to incorporate the MSRP display price code (originally intended for insertion into product_info.php) into PriceFormatter.php or how to do it with the existing product_info.php file. Original code in /product_info.php: if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } MSRP code designed to replace existing product_info.php code: $products_price = '<table class="PriceList" border="0" width="100%" cellspacing="0" cellpadding="0">'; $new_price = tep_get_products_special_price($product_info['products_id']); if ($product_info['products_msrp'] > $product_info['products_price']) $products_price .= '<tr><td>' . TEXT_PRODUCTS_MSRP . '</td><td class="oldPrice" align="right">' . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; $products_price .= '<tr><td>' . TEXT_PRODUCTS_OUR_PRICE . '</td>'; if ($new_price != '') {$products_price .= '<td class="oldPrice"';} else {$products_price .= '<td';} $products_price .= ' align=right>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') {$products_price .= '<tr class="productSpecialPrice"><td>' . TEXT_PRODUCTS_SALE . '</td><td align=right>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';} if ($product_info['products_msrp'] > $product_info['products_price']) {if ($new_price != '') {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] - $new_price) , tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_msrp'] - $new_price) / $product_info['products_msrp']) * 100) . '% )</td></tr>';} else {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] - $product_info['products_price']) , tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_msrp'] - $product_info['products_price']) / $product_info['products_msrp']) * 100) . '% )</td></tr>';}} else {if ($new_price != '') {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_price'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' (' . ceil((($product_info['products_price'] - $new_price) / $product_info['products_price']) * 100) . '% )</td></tr>';}} $products_price .= '</table>'; Original product_info.php code replaced by Quantity Price Breaks: /* REPLACED by Quantity Price Break per Product V-1.11.2_1 if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = 'Regular Price: <s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice"><br>Special Price: ' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = 'Your Price: <font color ="#FF0000">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</font>'; } */ // BEGIN Quantity Price Break per Product V-1.11.2_1 $pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id); $products_price=$pf->getPriceString(); // END Quantity Price Break per Product All formatting of prices, special prices, quantity discounts, are now located in the new PriceFormatter.php file. As a result, I have no idea how to replace and or add the new MSRP code. I've attached the PriceFormatter.php file and hope someone can help me with this problem. Thank you very much in advance!! PriceFormatter.php
  3. virtualink

    Quantity price breaks show % saving

    Is it possible to only enter the price break amounts and still show the percentage savings based upon the original/sale price? Example: Regular Price $ 10.00 Buy 2+ for $9.00 each Save 10% Buy 3+ for $8.00 each Save 20% Buy 4+ for $7.00 each Save 30% Thank you very much in advance. Great job!
  4. virtualink

    Quantity Price Breaks Per Product

    Please disregard my previous post. Problem corrected. Operator error. Failed to follow instructions for includes/classes/shopping_cart.php. In CRE version the code is a little different, find the following: $products_price = $pf->computePrice($qty); $products_weight = $product['products_weight']; Immediately after delete: $special_price = tep_get_products_special_price($prid); if ($special_price) { $products_price = $special_price; Works fine now.
  5. virtualink

    Quantity Price Breaks Per Product

    Problems with Shopping cart. This contribution works great. However, I am having problems when an item is on special. Example: Special price of item is $10.00. Quantity Discounts set at 2+ $9.00. When 2 items are added, the shopping cart shows $18.00 - which is correct. However, the sub-total shows $20.00 - incorrect. It seems the special price is overiding the quantity discount price in the shopping cart. When there is no special price, the quantity discount works great - no problems in the shopping cart. Any ideas please?
  6. virtualink

    Country-State Selector

    You are absolutely correct! In searching further, I located another form_check.js.php file. If you are using the CRE loaded V6.15 version, the correct form_check.js.php is located at: /includes/javascript/ Following the instructions provided (except the new location for form_check.js.php on CRE Loaded v 6.15 build only) I added the following code to /includes/javascript/form_check.js.php: <?php // +Country-State Selector ?> function refresh_form(form_name) { form_name.action.value = 'refresh'; form_name.submit(); return true; } <?php // -Country-State Selector ?> And it works fine. Thank you very much for your help!!!
  7. virtualink

    Country-State Selector

    I located the form_check.js.php in the /includes/ directory. Do you know of any other way to see if there are duplicates with different names? I've checked for the same name in other directories with negative results.
  8. virtualink

    Country-State Selector

    Great contribution. I use it in my live store Hawaii Online Sales and it works great! I'm in the process of changing my store to CRE loaded version 6.15. The problem I am experiencing is the refresh. When changing the country in both new account and in the address book, the states do not refresh. I've searched for anything related to this CRE loaded problem but was unable to locate any solutions. I've read the previous topics and according to the firefox browser java counsole the error is: refresh_form is not defined. I've also looked at my code source and the function refresh_form is not present. I've also checked the /includes/form_check.js.php file and it is referenced from the create_account.php. My develop site is at: Hawaii Online Sales Loaded CRE Develop Site The CRE loaded version is using "Template Install & Configure V1.2" and I believe this is the problem. While making the required modifications to the files (per instructions), I discovered that the html code which is supposed to be contained in create_account.php is not present, and is located in a file named create_account.tpl.php which is located in a directory under "templates/contents". Current instructions, in create_account.php Look for: Line 418 Replace: if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array); } else { echo tep_draw_input_field('state'); } } else { echo tep_draw_input_field('state'); } I find in templates/content/create_account.tpl.php: if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[] = array('id' => '', 'text' => ''); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array); } else { echo tep_draw_input_field('state'); } } else { echo tep_draw_input_field('state'); } I replace it with: // +Country-State Selector $zones_array = array(); $zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = " . (int)$country . " order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']); } if (count($zones_array) > 0) { echo tep_draw_pull_down_menu('zone_id', $zones_array); } else { echo tep_draw_input_field('state'); } // -Country-State Selector I also find in templates/content/create_account.tpl.php: <td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> And I replace it with: <?php // +Country-State Selector ?> <td class="main"><?php echo tep_get_country_list('country',$country, 'onChange="return refresh_form(create_account);"') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> <?php // -Country-State Selector ?> All other code locations/replacements were found alright and no other "special" files were modified. I realize that the problem is with the template system and NOT this contribution. Unfortunately, no one at CRE loaded incorporated your contribution into their build so I am stuck - too bad because I find it hard to believe that people would rather their customers type a state field instead of a drop down selection list. Any help you provide would be greatly appreciated. My develop site is at: Loaded Develop Site Thank you in advance for any help!!
×