Zen Follower
- Join Date:
- Jun 2009
- Posts:
- 100
- Plugin Contributions:
- 0
MSRP contrib
Tried to download this mod and some jibberish code pops up, any ideas?
I was able to download the earlier version but it says there was a bug.
Views: 82,052
Zen Follower
Tried to download this mod and some jibberish code pops up, any ideas?
I was able to download the earlier version but it says there was a bug.
Zen Follower
Also I dont quite understand the the first thing to do. Help please.
- Add a new field to the products table to hold the MSRP value.
ALTER TABLE
tableprefix_productsADDproducts_msrpDECIMAL( 15, 4 ) NOT NULL AFTERproducts_price;(If you have not chosen a Table Prefix in your zencart installation, then change the 'tableprefix_products' to 'products'. If you have a Table Prefix, then replace 'tableprefix' with your custom one. If you are unsure, try just putting in 'products', and if it fails view your SQL Table and you should be able to find 'yourprefix_products'.)
Zen Follower
Anyone?
Zen Follower
All you do is copy and paste that line into Admin / Tools / Install SQL Patches inside your store admin.
If you created a prefix when you set up your store, something like zencart, then the line would look like this:
ALTER TABLE zencart_products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price ;
If you don't have a prefix then it would look like this:
ALTER TABLE products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price ;
https://www.jhelectronics.com
Using Zencart 1.3.9h
Zen Follower
TUVM :clap:
It took a little while to enter everything, but I actually did it right and it worked!!
Thanks again! :D
New Zenner
smoke133:
All you do is copy and paste that line into Admin / Tools / Install SQL Patches inside your store admin.
If you created a prefix when you set up your store, something like zencart, then the line would look like this:
ALTER TABLE
zencart_productsADDproducts_msrpDECIMAL( 15, 4 ) NOT NULL AFTERproducts_price;If you don't have a prefix then it would look like this:
ALTER TABLE
productsADDproducts_msrpDECIMAL( 15, 4 ) NOT NULL AFTERproducts_price;
How would I do this in phpMyAdmin? I added the "zen_products_msrp" field but I dont understand where to add the "AFTER products_price ;" bit
A created the "zencard_products_msrp" field with the type being a decimal and added the 15,4 length/value and selected not null and that is where i got stuck.
New Zenner
BoutiqueMusic:
How would I do this in phpMyAdmin? I added the "zen_products_msrp" field but I dont understand where to add the "AFTER
products_price;" bitA created the "zencard_products_msrp" field with the type being a decimal and added the 15,4 length/value and selected not null and that is where i got stuck.
I also tried adding the table in the Install SQL Patches thing and apparently I don't have a products_price field.....
Help.....
New Zenner
Nevermind...I'm an idiot.
I got it to work by taking the "zencart_" out of the statement and the Admin tool worked perfectly.
ALTER TABLE zencart_products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price ;
New Zenner
Hi, thx for your contribution. I need your help. I'd really appreciate if I could display MSRP only on product listing page. Would you mind to make this code for me?
Totally Zenned
Is it possible to not have the section that says You save: so much %
I just want it to lsit the MSRP price
Totally Zenned
Figured that out, but how can i remove the strike through o nthe MSRp price?
New Zenner
i had a problem on my site with some % showing 10 decimal places instead of 2 like this 56.000000001% and it was because of part of the calculation was out side of the number function so if you change this in
includes/functions/functions_price.php
if ($display_normal_price == 0) {
// don't show the $0.00
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100 . '% '.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}else{
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
}
} else {
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100 . '% '.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}else{
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
}
to this
if ($display_normal_price == 0) {
// don't show the $0.00
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . (((($display_msrp_price - $display_normal_price) / $display_msrp_price)* 100 ), 2, '.', '') . '% '.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}else{
$final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
}
} else {
if(($display_msrp_price!='')&&($display_msrp_price!='0')){
$final_display_price = '<span class="smalltext1"><s>'.TEXT_PRODUCT_MSRP.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></span><br><span class="save">'.TEXT_PRODUCT_SAVE . (((($display_msrp_price - $display_normal_price) / $display_msrp_price)* 100 ), 2, '.', '') . '% '.'</span><br><span class="norm">'.TEXT_PRODUCT_OUR.$show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount.'</span>' ;
}else{
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
}
what i changed was this line
number_format((($display_msrp_price - $display_normal_price) / $display_msrp_price), 2, '.', '') * 100
to this
number_format(((($display_msrp_price - $display_normal_price) / $display_msrp_price)* 100 ), 2, '.', '')
i hope this helps someone out there
Totally Zenned
Hi,
Does anyone know if this mod (MSRP) and this mod (MAP Pricing ( m.a.p ) : Add to Cart to See Price) are compatible - can they both be installed on a ZC store?
I am assuming that since they both deal with pricing there could be some conflicts with the code, anyway, does anyone know if they can both be installed on the same store. Is it at all possible?
Thank you.
Thank you,
autoace
Totally Zenned
autoace:
Hi,
Does anyone know if this mod (MSRP) and this mod (MAP Pricing ( m.a.p ) : Add to Cart to See Price) are compatible - can they both be installed on a ZC store?
I am assuming that since they both deal with pricing there could be some conflicts with the code, anyway, does anyone know if they can both be installed on the same store. Is it at all possible?
Thank you.
Yes, we use both. You have to be careful when merging the code in functions_prices since they both modify the same function, but it works well.
Totally Zenned
lankeeyankee:
Yes, we use both. You have to be careful when merging the code in functions_prices since they both modify the same function, but it works well.
I would like to see your site for MAP pricing.
Kim
kburner
Burner Christian Bookstore
https://www.burnerbooks.com
Totally Zenned
Hi I want to know how I can add and change all prices with easypopulate. I added a field v_products_msrp_price but that doesn't work or add my prices in the database for products_msrp. Thanks in advance.
Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
Totally Zenned
countrycharm:
Hi I want to know how I can add and change all prices with easypopulate. I added a field v_products_msrp_price but that doesn't work or add my prices in the database for products_msrp. Thanks in advance.
It should just be v_products_msrp. But, if you haven't altered EP then it won't work. In case you haven't seen it, I created a tutorial on how to add fields to EP, you can read it here
Totally Zenned
Totally Zenned
lankeeyankee:
It should just be v_products_msrp. But, if you haven't altered EP then it won't work. In case you haven't seen it, I created a tutorial on how to add fields to EP, you can read it here
This does not work for me. I still for some strange reason get it to upload my prices for msrp. Do I have to change the code for MSRP before it will work right. What I mean change it like the above says to. I see I have to put the higher cost of a item in msrp and what I'm selling it for in the Products Price to get it to show the lower price. Seems like this works backwards. Thanks for you help. I have tried the easy_populate_csv_1-2-5-6-csv-2
easy_populate 1-2-5-5, and I have the bought version easypopulate_3.0.3_inc_patch1. I can't get none of them to work.
Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
Totally Zenned
Never mind I got the version I bought to work easypopulate_3.0.3_inc_patch1. Thanks anyway.
Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
Tell staff why this post should be reviewed.