MSRP contrib

Views: 82,052

Results 321 to 340 of 393
5 Jul 2013, 12:21 AM
#321
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

MSRP contrib

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

5 Jul 2013, 12:50 AM
#322
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: MSRP contrib

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, https://www.deliawilsondesign.com, https://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 ;

  1. 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

7 Jul 2013, 10:55 PM
#323
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: MSRP contrib

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:

<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>' ;

And it returns the following correctly:
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:

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;

This is all being done on a test site http://www.natureswonderland.com.au/...php?main_page=

7 Jul 2013, 11:35 PM
#324
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: MSRP contrib

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

8 Jul 2013, 12:20 AM
#325
alivewjesus avatar

alivewjesus

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: MSRP contrib

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.

Using Zen Cart 1.5.1
Many mods
www.crosbysgifts.com

8 Jul 2013, 12:39 AM
#326
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: MSRP contrib

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

8 Jul 2013, 2:20 AM
#327
alivewjesus avatar

alivewjesus

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: MSRP contrib

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.

Using Zen Cart 1.5.1
Many mods
www.crosbysgifts.com

8 Jul 2013, 2:27 AM
#328
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: MSRP contrib

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

14 Sep 2013, 6:03 PM
#329
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: MSRP contrib

I am Lost.

Anyone can tell me where in the following file do you add the chunk of code below to make it work?

  1. 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;
}

17 Sep 2013, 10:30 PM
#330
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: MSRP contrib

twi:

I am Lost.

Anyone can tell me where in the following file do you add the chunk of code below to make it work?

  1. 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;
}

Just to answer my own question and help those that need it n the future. You put the above quote at the end of the mentioned file.

4 Dec 2013, 4:56 AM
#331
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: MSRP contrib

Using Zencart 1.5.1

I have installed including the patch for MySQL. I even tried within myPHP admin. I cannot see any changes at all on the site?
I have definitely uploaded the new files in correct places as per instructions. I am familiar with adding MODs.

Can anyone perhaps suggest a solution?

PS: includes/functions/functions_price.php file in merge looked very different so I just uploaded the whole new includes/functions/functions_price.php file as is to replace my old one.

Downunder QLD

4 Dec 2013, 5:09 AM
#332
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: MSRP contrib

Ok working now.

I did not realized that I had to set prices individually in each product. This is is hopeless for me as I wanted the effect to show for my 'Specials' prices when I set a 'special' price for a product.

Downunder QLD

4 Dec 2013, 4:32 PM
#333
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: MSRP contrib

OAVS - It would be relatively easy to 'display' the MSRP field on your site, please detail where/how you'd like it displayed on the product page... or elsewhere?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

12 Apr 2014, 3:31 PM
#334
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: MSRP contrib

When I first installed the module by overriding my new installed Zen Cart demostore I got a PHP syntax error, then I went to the code and noticed there was a missing }
around line 333 I found the

$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
}
} 
/* I had to add the following } to avoid this error >> PHP Parse error:  syntax error, unexpected $end in /home/seasonbr/public_html/demostore/includes/functions/functions_prices.php on line 1408 */
 }

That's the modified section of the code inside functions_prices.php
It created a blank screen, because of this, however now, after the fix, it's not displaying any prices. Any ideas why this is happening?

13 Apr 2014, 3:01 PM
#335
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: MSRP contrib

The code displays what it finds in each of the variables in the output line:
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;

You've either got an error in one of the variables to the right of the equal sign, or they are all zeros.

What exactly did your error log say when it posted the PHP syntax error?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

24 Apr 2014, 6:00 PM
#336
icecold avatar

icecold

Zen Follower

Join Date:
Jul 2008
Posts:
360
Plugin Contributions:
0

Re: MSRP contrib

twitchtoo:

The code displays what it finds in each of the variables in the output line:
$final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;

You've either got an error in one of the variables to the right of the equal sign, or they are all zeros.

What exactly did your error log say when it posted the PHP syntax error?

Right now I am not getting errors yet the site is not displaying ANY prices

http://www.theoutletseason.com/demostore

I didn't check the variable $final_display_price content, to see if it was 0.
I know it's the result of all the others concatenated ...

26 Apr 2014, 9:47 PM
#337
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: MSRP contrib

The link you sent has some other problems, it's not rendering the page elements you can see correctly let alone the prices. That points me at a problem with the sheffield blue template install first. What happens when you switch to the classic green template?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

4 Jun 2014, 3:36 PM
#338
darkangel69 avatar

darkangel69

New Zenner

Join Date:
Jun 2014
Location:
Mississippi
Posts:
3
Plugin Contributions:
0

Re: MSRP contrib

Howdy!
Sure hope you folks can help me figure this out.
Running newest Zen-cart version. When I install the MSRP mod, the site won't come up. I can log into the admin, look at products, change the msrp price, etc, but the site itself stops working.
I've uninstalled the mod and re-installed. I've uninstalled Zen-cart itself and re-installed 4 or 5 times and always double check to make sure everything goes in it's proper place. But the end result is always the same.
This last time, I used winmerge to merge files and install this mod and the MAP mod simultaneously. On the backend, I have entries for map pricing and msrp when configuring a product, but the site does the same thing as when the msrp is installed by itself: blank.
Any suggestions?

4 Jun 2014, 4:12 PM
#339
darkangel69 avatar

darkangel69

New Zenner

Join Date:
Jun 2014
Location:
Mississippi
Posts:
3
Plugin Contributions:
0

Re: MSRP contrib

Update:

I uploaded the functions_prices.php file from the MAP mod and the site is working again, so the problem lies within the msrp code of that file.

4 Jun 2014, 4:32 PM
#340
darkangel69 avatar

darkangel69

New Zenner

Join Date:
Jun 2014
Location:
Mississippi
Posts:
3
Plugin Contributions:
0

Re: MSRP contrib

another update:

I downloaded the version of the MSRP contrib that is one version older and uploaded just the functions_prices.php file from that version, and now the msrp line is working on the products page, so there's something a little wonky about that file in the newest download.

Of course I lost the MAP function, so I'm going to try another winmerge with this working file and see what happens. I'll let you know if it works.