swguy:
I have apparently done something wrong because it is not working. I thought that if I changed the two prices, net and gross that would do it but they won't change. I'm kind of lost at this point??
Thanks for your help,
Silver
Printable View
swguy:
I have apparently done something wrong because it is not working. I thought that if I changed the two prices, net and gross that would do it but they won't change. I'm kind of lost at this point??
Thanks for your help,
Silver
swguy:
I don't know if you have seen the additional responses I placed or not. It's not working. The only thing that I did not do was the files that are in the Included files in the directions where it starts "All of the rest of the files are core." I will include a list of the installation instructions to see if you can help.
-----------------------------------------------------------------
Zen Cart Mod: MSRP Display
Released under the GPL license found in the root directory of this package.
Author: hbtrading
Upgraded for: Zen Cart v 1.3.9x by Delia Wilson Lunsford, www.deliawilsondesign.com, www.zencartdelia.com
Upgraded for Zen Cart 1.5 by Ray
------------------------------------------------------------------
This modification allows you to show that your store price is lower than the manufacturer's suggested retail price. If your price is the same as or higher than the MSRP, then the MSRP will not be displayed. The customer's savings will also be displayed if it applies. Savings is based on the MSRP if it applies or on the selling price if a sale price is in effect.
------------------------------------------------------------------
Included files:
New
includes/languages/english/extra_defintions/your_custom_template/msrp.php
your_admin/includes/languages/english/extra_defintions/msrp.php
All of the rest of the files are core files with no override folders.
includes/functions/functions_price.php
your_admin/includes/modules/update_product.php
your_admin/includes/modules/copy_to_confirm.php
your_admin/includes/modules/product/collect_info.php
------------------------------------------------------------------
Installation instructions
If you choose to install the MSRP mod using the enclosed files, you only need to make the following 2 changes. Upload the files to their respective folders - note that you must change the admin name to your name and your_custom_template to your template folder.
1. Add a new field to the products table to hold the MSRP value.
ALTER TABLE products ADD `products_msrp` DECIMAL( 15, 4 ) NOT NULL AFTER `products_price` ;
2. In includes/templates/your_template/css/stylesheet.css, or includes/templates/classic/css/stylesheet.css
Add:
.smalltext1 {
text-align: center;
color:#000000;
font-weight:bold;
}
.save {
text-align: center;
color:#636466;
font-weight:bold;
}
.norm {
text-align: center;
color:#981B1E;
font-weight:bold;
}
------------------------------------------------------------
Uninstall Instructions
If you decided you want to remove this mod, it's a case of reversing the actions above.
1) remove the added field to the products table that holds the MSRP value by either using your MYSQL Admin via your hosts c/p or run
ALTER TABLE `products` DROP `products_msrp`
2) Delete
includes/languages/english/extra_defintions/your_custom_template/msrp.php
your_admin/includes/languages/english/extra_defintions/msrp.php
3) Replace the folowing with the originals
includes/functions/functions_price.php
your_admin/includes/modules/update_product.php
your_admin/includes/modules/copy_to_confirm.php
your_admin/includes/modules/product/collect_info.php
4) Remove the CSS styling from your includes/templates/your_template/css/stylesheet.css file.
------------------------------------------------------------------
Change log:
Sept 9, 2011: moved languages changes to extra_definitions and new files, added copy product function, upgraded to 1.3.9h
June 11 2012: upgraded to match zen cart's 1.5 file set and added uninstall instructions.
Thanks again. I'm pulling my hair out, what little I have!
Silver
Need help with customization of MSRP module - some prices do not display correctly:
Wondering if you can help me with a formula I am trying to get right for some pricing on a store that has MRSP and runs sales and specials. Basically what I have achieved is to show a TOTAL SAVING amount when there is a normal price, mrsp price, special or sale – but keep getting one error (last one)
This is what I have:
And it returns the following correctly:Code:<span class="savespecial">' . '<br />' . PRODUCT_PRICE_DISCOUNT_PREFIX . $currencies->display_price(-$display_mrsp_price +(($display_normal_price - $display_sale_price - $display_price_save)), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT . '</span>' ;
RRP: AU$715.00
Our Price: AU$599.00 Special Price: AU$469.00
Save: AU$246.00
OR
AU$34.95 Special Price: AU$17.48
Save: AU$17.47
OR
RRP: AU$737.00
Our Price: AU$675.00 Special Price: AU$625.00
Sale: AU$562.50
Save: AU$174.50
So it works if there is a normal price or RRP price and there is a SPECIAL or SALE, but for the life of me I cannot get it to work for
Just a normal price and RRP price (no sale and no special) – see below
RRP: AU$935.00
Our Price: AU$549.00
Save: AU$935.00 – this is WRONG (should be $386)
I am working in the functions_prices.php file. – this is the whole section of code:
This is all being done on a test site http://www.natureswonderland.com.au/...php?main_page=Code:if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$save=$display_msrp_price-$display_normal_price;
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount . $show_discount_amount;
}
} else {
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$save=$display_msrp_price-$display_normal_price;
$final_display_price = '<span class="pblock">
'.TEXT_PRODUCT_MSRP.'</span>
<span class="smalltext1"><s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br>
<span class="pblock">'.TEXT_PRODUCT_OUR.'</span>
<span id="elPrice" class="norm">'. $show_normal_price .$show_msrp_price . $show_special_price . $show_sale_price .'</span>
<span class="savespecial">' . '<br />' . PRODUCT_PRICE_DISCOUNT_PREFIX . $currencies->display_price(-$display_mrsp_price +(($display_normal_price - $display_sale_price - $display_price_save)), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT . '</span>' ;
} else {
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
I really wish I could help. As you can see, I am relatively new to Zen also. I displayed the code also and can't get any help either. May be this plugin just does not work. I don't know.
Good Luck,
Silver
If you haven't made any modifications to those files you should be able to overwrite them with the included files (after backing them up just incase). If you've made changes to them then you'll need to use winmerge or beyond compare etc to compare the files and merge into them the updated/changes lines.
alivewjesus:
Thank you for the response. BTW, I absolutely love your name. On the subject, I am very confused at this point. On #1) Add a new field to the products table to hold the MSRP value, I took that to mean it needed to be placed here:
your_admin/includes/modules/update_product.php . #2) I'm still not sure where to add this so I placed it at the end of here:
In includes/templates/your_template/css/stylesheet.css, or includes/templates/classic/css/stylesheet.css
Nothing is working. Are you saying I would be better off replacing the original files and starting over?
Thank you for responding!
Silver
Silver,
You want to go under the tools menu and select the Install SQL Patches link and paste the following code in the box:
ALTER TABLE products ADD `products_msrp` DECIMAL( 15, 4 ) NOT NULL AFTER `products_price` ;
that will add the entry for MSRP that way you have a place in the database to store the information.
As far as overwriting core files is up to you. If you haven't made any changes with any other mods you should be fine doing so. I have in the past but I've also had to do the whole comparing files to merge over the changes. One thing I can't stress enough as will everyone else here that helps out is back up back up backup. Another suggestion if your site is live create a duplicate in a subfolder and do your trial and error there. That way you don't risk taking down your site and losing sales.
alivewjesus:
I had done that (You want to go under the tools menu and select the Install SQL Patches link and paste the following code in the box:
ALTER TABLE products ADD `products_msrp` DECIMAL( 15, 4 ) NOT NULL AFTER `products_price` ;)from the advise of a previous thread. It still made no difference???? I don't have winmerge or beyond so I will have to back up and find them and learn how to use them also.
Thanks for your help,
Silver
I am Lost.
Anyone can tell me where in the following file do you add the chunk of code below to make it work?
2. In includes/templates/your_template/css/stylesheet.css, or includes/templates/classic/css/stylesheet.css
Add:
.smalltext1 {
text-align: center;
color:#000000;
font-weight:bold;
}
.save {
text-align: center;
color:#636466;
font-weight:bold;
}
.norm {
text-align: center;
color:#981B1E;
font-weight:bold;
}