MSRP contrib

Views: 82,052

Results 41 to 60 of 393
1 Aug 2008, 12:23 AM
#41
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

MSRP contrib

iZilla_Pod:

I messed around with the code for awhile. Hopefully this will help someone.

Heres the original piece of code for the contribution you will be replacing:

if ($display_normal_price == 0) {
  // don't show the $0.00
  if(($display_msrp_price!='')&&($display_msrp_price!='0')){
  $save=$display_msrp_price-$display_normal_price;
      $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $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 .$currencies->display_price($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')){
 $save=$display_msrp_price-$display_normal_price;
      $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$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 .$currencies->display_price($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;
  }
}
> This will show the "You Save" with dollar amount only:
> ```php
    if ($display_normal_price == 0) {
      // don't show the $0.00
      if(($display_msrp_price!='')&&($display_msrp_price!='0')){
      $save=$display_msrp_price-$display_normal_price;
          $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $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 . $currencies->display_price($save, '') . '</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')){
     $save=$display_msrp_price-$display_normal_price;
          $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$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 . $currencies->display_price($save, '') . '</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;
      }
    }

This will show the "You Save" as a percentage only:

if ($display_normal_price == 0) {
  // don't show the $0.00
  if(($display_msrp_price!='')&&($display_msrp_price!='0')){
  $save=$display_msrp_price-$display_normal_price;
      $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $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)), 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')){
 $save=$display_msrp_price-$display_normal_price;
      $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$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)), 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;
  }
}
> This will remove the "You Save" line completely:
> ```php
    if ($display_normal_price == 0) {
      // don't show the $0.00
      if(($display_msrp_price!='')&&($display_msrp_price!='0')){
      $save=$display_msrp_price-$display_normal_price;
          $final_display_price = '<span class="smalltext1">' . TEXT_PRODUCT_MSRP . '<s>' . $currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s></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')){
     $save=$display_msrp_price-$display_normal_price;
          $final_display_price = '<span class="smalltext1">'.TEXT_PRODUCT_MSRP.'<s>'.$currencies->display_price($display_msrp_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).'</s></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;
      }
    }

I'm also looking at moving the "You Save" line below the "MSRP Price" and "Our Price" so that it's in a more logical order. I need to get some rest right now though.

Thanks for sharing that info but i am not sure if you notice that the percent is the dollar amount saved in percent, for example if your saving 500.00 is will look like this 500% and the value is not the true percent of saving. To get the true percent all you have to is remove this section of the code

.$currencies->display_price($save, '')

In both lines as you shown

it should then look like this

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

You can view it in action at https://www.lextechs.com

Lextechs.com Powered By ZenCart

22 Sep 2008, 3:59 PM
#42
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

Is this the latest file? Somewhere I thought I read that you wanted to change some files....

I noticed in the reading of the posts you have an area to show php code for %, $ only not Both. What file is that located in?

For step #1 - Do I insert the entire line starting from Alter table.....to products_price; into my SQL file?

Great job with this mod! Thank you.

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

23 Sep 2008, 10:03 PM
#43
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

Ok I figured out how to do #1. Or at least there are no errors.

But, My right sideboxes are gone. I made first mistake with instruction #5 and loaded to wrong file. Fixed that. But does anyone know which file would effect the right sideboxes only???

Thanks,
Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

23 Sep 2008, 10:15 PM
#44
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

kalu-desi:

Besides hbtrading, I see others have gotten this to work. I was trying to implement the changes in ZenCart 1.3.7 and can see the MSRP/PRICE when I administer the shopping cart from domain/store/login in the Catalogs/Products section. But I don't see the MSRP and information on the actual site pages. There is one or two sections in the MSRP contrib text file that don't coincide with my setup.

Step 3: catalog/admin/modules/update_product.php... On my install I have the install folder which I assume is catalog then /admin/includes/modules/update_php... Is that right?

Step 4: has the same setup as above except using the file -- collect_info.php

Any help would be appreciated if somebody could point me in the right direction. :(

I have the same setup with Step 3 & 4. Did you use the /admin/includes/modules/....? I tried it and my right sidebox is gone??

I have version1.3.8a.

Any help is greatly appreciated! Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

24 Sep 2008, 3:47 PM
#45
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

kbalona:

OK, I re-did changing the Admin files and it works now:)
Thanks for the help.

What did you do? My files are located the same way with admin/includes/modules not admin/modules. Did you re-locate the file or just go the one in admin/includes/modules?

Thanks,
Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

25 Sep 2008, 5:14 PM
#46
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

Hello...I am still trying to get this contri to work. I made sure the SQL (#1 in directions) is on my table.

When I go into a product from the admin area, I preview the MSRP price, etc and when I hit save. I keep getting this error. I have gone through the coding and can't seem to find the problem. I copied some before and after line 178. It is right at the end of the file.

error: Parse error: syntax error, unexpected '}' in /home/####/####/admin/includes/modules/update_product.php on line 178

exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $small_width . " " . $filename_small);
}
}

zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));

}
?>

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

25 Sep 2008, 7:46 PM
#47
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

YAH! Finally got this contri to work.

Does anyone know how to do a mass 10% without using other regular discount??

It looks really good! Thank you!:clap:

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

1 Oct 2008, 2:40 PM
#48
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: MSRP contrib

kburner:

YAH! Finally got this contri to work.

Does anyone know how to do a mass 10% without using other regular discount??

It looks really good! Thank you!:clap:

you might want the try the mod call quick update, you can do mass price changes

Lextechs.com Powered By ZenCart

2 Oct 2008, 3:43 PM
#49
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

hbtrading,

I really like your product display for https://www.hbwatches.com.

Did you use the tab products pro mod? What mod?

Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

2 Oct 2008, 7:58 PM
#50
jasonk avatar

jasonk

New Zenner

Join Date:
Sep 2008
Posts:
21
Plugin Contributions:
0

Re: MSRP contrib

There is no such directory structure as

catalog/admin/modules/update_product.php

3 Oct 2008, 11:24 AM
#51
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: MSRP contrib

hbtrading,

I really like your product display for https://www.hbwatches.com.

Did you use the tab products pro mod? What mod?

Thanks, Kim


kburner
https://www.burnerbooks.com

I accidently put this post in the wrong area....can someone please move it? Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

14 Oct 2008, 11:33 PM
#52
majoritywhip avatar

majoritywhip

New Zenner

Join Date:
Jul 2008
Location:
San Francisco
Posts:
63
Plugin Contributions:
0

Re: MSRP contrib

I have the same question as Kitteh

Major Innovations in Teknology and Style
Majortek.com

28 Oct 2008, 6:12 PM
#53
ceegeeaar avatar

ceegeeaar

New Zenner

Join Date:
Mar 2007
Location:
Deep in the Black Country, UK
Posts:
34
Plugin Contributions:
0

Re: MSRP contrib

I have a site with 16000 products already on it I'd like to add this mod to. What is the best way to get the RRP pricing into the database?

I can create a csv with product id and rrp but no idea how to get that data into the database in the right place and in the right order. I could use vlookup in a spreadsheet if I can get the products table into a csv or something similar and be able to reimport it but im sure there must be an easier way to do it.

Can anybody help?

Thankyou
Claire

30 Oct 2008, 11:39 AM
#54
ceegeeaar avatar

ceegeeaar

New Zenner

Join Date:
Mar 2007
Location:
Deep in the Black Country, UK
Posts:
34
Plugin Contributions:
0

Re: MSRP contrib

I've created a table zen_products_rrp with products_model and rrp in it and imported a csv with the relevant information.

Ive created products_msrp in zen_products and am trying to update it with the correct rrp's.

Can anyone tell me what is wrong with this sql query in phpmyadmin..

UPDATE 'zen_products' SET products_msrp = ( SELECT 'rrp'
FROM 'zen_products_rrp'
WHERE 'zen_products_rrp.products_model' = zen_products.products_model )

It returns an error..

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''zen_products' SET products_msrp = ( SELECT 'rrp'
FROM 'zen_products_rrp'
WH' at line 1

Im picking this up as I go along so syntax could be completely wrong!

Thankyou
Claire

30 Oct 2008, 12:03 PM
#55
ceegeeaar avatar

ceegeeaar

New Zenner

Join Date:
Mar 2007
Location:
Deep in the Black Country, UK
Posts:
34
Plugin Contributions:
0

Re: MSRP contrib

Worked it out, thanks anyway. It works if you remove the 's

30 Oct 2008, 12:15 PM
#56
ceegeeaar avatar

ceegeeaar

New Zenner

Join Date:
Mar 2007
Location:
Deep in the Black Country, UK
Posts:
34
Plugin Contributions:
0

Re: MSRP contrib

Hmm the problem now is that leading 0's have been stripped from my model numbers in zen_products so dont match the rrp ones. :ohmy:

10 Nov 2008, 10:56 PM
#57
majoritywhip avatar

majoritywhip

New Zenner

Join Date:
Jul 2008
Location:
San Francisco
Posts:
63
Plugin Contributions:
0

Re: MSRP contrib

Trying to get this to work for me but I can't seem to add the table to my DB. I have no idea how to do this with phpMyadmin, so I tried the script using the SQL patches tool in admin.

Here is the code that I submitted:

ALTER TABLE zen_products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price ;

And here is the error that I received:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zen_products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price' at line 1
in:
[ALTER TABLE zen_ zen_products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price ;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

So then I saw the zen_zen_products statement and figured that I should just write it simply as "products" since the "zen_" was being inserted.

Nope. Here is the error message:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price' at line 1
in:
[ALTER TABLE zen_ products ADD products_msrp DECIMAL( 15, 4 ) NOT NULL AFTER products_price ;]

Any ideas on step one?

Major Innovations in Teknology and Style
Majortek.com

11 Nov 2008, 12:20 PM
#58
ceegeeaar avatar

ceegeeaar

New Zenner

Join Date:
Mar 2007
Location:
Deep in the Black Country, UK
Posts:
34
Plugin Contributions:
0

Re: MSRP contrib

make sure you are using the slanty quotes next to number 1 and not single quotes next to semi-colon on your keyboard. It is usually Ok to ommit them if in any doubt.

Always make a backup of your database before messing with it though.

12 Nov 2008, 6:09 PM
#59
melvin41bet avatar

melvin41bet

New Zenner

Join Date:
Nov 2008
Posts:
4
Plugin Contributions:
0

Re: MSRP contrib

Hi,

I did everything it said but my store still shows just my regular prices. I do not see any error messages to why it want show the MSRP prices and YOU SAVE percentage.

http://lazywebprofits.com/cstore/

19 Nov 2008, 9:12 AM
#60
majoritywhip avatar

majoritywhip

New Zenner

Join Date:
Jul 2008
Location:
San Francisco
Posts:
63
Plugin Contributions:
0

Re: MSRP contrib

OK. I discovered that the script doesn't work in the SQL Patches tool and I got it to work using MyPHPadmin. What a great Contrib!

I have one more request, if y'all don't mind...

I would like to get rid of the strike through in "Retail Price" while still leaving it in the dollar amount.

I find it unreadable when it spans the entire line.

Any help would be exceptionally appreciated.

Major Innovations in Teknology and Style
Majortek.com