Jump to content
Sign in to follow this  
hozone

[contribution] CGDiscountSpecials

Recommended Posts

This contribution allows to create Customers Groups, and to bind a discount rate to them.

The administrator can set groups, group's discount, and bind customers to groups.

This contribution adds a Discount Rate per Customers, the administrator can easily edit discounts from the administration Customers panel.

Every Customers has it's own discount rate.

It is also possible to select the special prices for customers groups or single customers.

 

Prices Policies:

.product price = customer special price OR

..............customer group special price OR

..............special price OR

..............base price + customer discount + customer's group discount

..Prices priority is here visualized. For example suppose that a special price "X" is inserted for the product "PRODUCT" only for the customers "PINCO", bind to group "GROUP", and also a special price "Y" is insert for the product "PRODUCT" only for the group "GROUP". Price for customers "PINCO" of the product "PRODUCT" will be "X", not "Y"!.

 

Other Features:

.> users must be logged in to see prices

.> every user can see the personalized prices calculated using the pricing policies above.

.> administrator can:

..> add and set users groups

.> every group has:

..> a discount rate (only administrator can set the discount value)

..> if present a special personal price per product

.> every customers:

..> a discount rate (only administrator can set the discount value)

..> a group (only administrator can bind customers to groups)

..> if present a special personal price per product


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites

Hi

Just downloaded and open the readme file. The instructions are not that clear.

Kindly let me know the difference between the folder diff and MS2 patched?

If I am using osC v2.2MS2, I have to use the MS2 patched folder? Do I need to copy the difference from your files into my files? As I have modified some of the files from other contributions. Please let me know. Thanks. :rolleyes:

Share this post


Link to post
Share on other sites

Hi

Finally the contributions worked but there is error on under the special items. Under special sections, the headings and price are repeated and annoying. Is there any way to fix the problem? :rolleyes:

Seems that no one supports this contribution.

Share this post


Link to post
Share on other sites

Hi Davide.

 

Sorry to post here but I'm a Php and OSC newnie and looks like a screwed up something with the installation of your contribuition.

Again, I'm not sure that this is happening because of a bug in the CG DiscountSpecial contribution. Maybe it's just me messing with the sources.

 

Here is my problem. On the shopping _cart.php page if I put more than 1 quantity for one product on the next page, checkout_shipping.php I can see that the shopping cart contains still only 1 item fro mthe product. If I go again to shopping_cart page, modify the quantity again and this time use the Update button the qty is updated.

Look like a default qty parameter for the sopping cart contructor is set to '1', but I can't find it exactly.

 

Thanks in advance for your help.

 

Cristian

Share this post


Link to post
Share on other sites

On second thought this could mean I'm just plain stupid.

 

Sorry to bother you but it seems that this is more like a feature than a bug. The shopping cart is not updated when you go to checkout. If you want to have it updated you need to press Update button and then go to checkout.

 

Sorry again for spaming this thread and this great contribution !

 

Cristian

Share this post


Link to post
Share on other sites

Hi Davide.

 

Let me first say that this is a great contribution!

 

Just one question:

Is there any easy way of disabling the feature: *users must be logged in to see prices

 

I want to give users a default 0% discount when not logged in.

 

Thanks

Knut


www.artracing.no - www.alexi.no - www.tvillingbutikken.no

Share this post


Link to post
Share on other sites

Hi there.

I'm not a PHP guru, actually I'm a newbie but I've changed CG Discount Specials so that it displays the prices for logged in users based on a setting in Admin. No big deal. So Knut, if you are interested I can give you some pointers.

 

Cristian

Share this post


Link to post
Share on other sites

Hi Davide

 

1st I think it is a great contrib, but I will also need to specify product categories discounts for customers groups.

 

But first I have some trouble getting the contrib working. It installs well -> when you a brose a category of say 100 products, It shows only the first page and linsk to go to other pages to see more products is missing.

 

What am I doing wrong.?

 

Thanks

 

SSD

Share this post


Link to post
Share on other sites

Good Evening -

 

I am excited about this contrib and had a few questions. I am using this contrib along with BTS (Basic Template System). I have it installed and it works, showing the price of the item, etc. Although, once you proceed to check-out (i.e. http://test.vmwake.com/checkout_confirmation.php) it shows the correct price, but the subtotal and total?s are incorrect, once I actually finish the transaction the customer (test mode) gets billed for the full amount ? no discounts.

 

I was successful in getting the price to show correctly on: http://test.vmwake.com/checkout_confirmation.php, however, I had to change:

 

//CGDiscountSpecials start

echo ' <td class="main" align="right" valign="top">' . $currencies->display_price_nodiscount($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .

' </tr>' . "\n";

//CGDiscountSpecials end

 

-to-

 

//CGDiscountSpecials start

echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .

' </tr>' . "\n";

//CGDiscountSpecials end

 

 

Can someone please help me find out how I can get the correct subtotals through checkout? I assume that the ?Order Totals? module needs to be changed.

 

Thanks.

 

matthew

Edited by Johnson

Share this post


Link to post
Share on other sites
Hi Davide

 

1st I think it is a great contrib, but I will also need to specify product categories discounts for customers groups.

 

But first I have some trouble getting the contrib working. It installs well -> when you a brose a category of say 100 products, It shows only the first page and linsk to go to other pages to see more products is missing.

 

What am I doing wrong.?

 

Thanks

 

SSD

this is because you are using version 1.2

i have a 1.3PRE that fix this bug, but i cant find NO-ONE (in 1 month!!) that test this contribution. i'm using this (1.3pre), and it seems to work, but i wont someone to test it better.

if you want i can mail this contrib to you (sen me a mail)

if you test it i'll post the 1.3 to this comunity, before your test!.


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites
Good Evening -

 

I am excited about this contrib and had a few questions. I am using this contrib along with BTS (Basic Template System). I have it installed and it works, showing the price of the item, etc. Although, once you proceed to check-out (i.e. http://test.vmwake.com/checkout_confirmation.php) it shows the correct price, but the subtotal and total?s are incorrect, once I actually finish the transaction the customer (test mode) gets billed for the full amount ? no discounts.

 

I was successful in getting the price to show correctly on: http://test.vmwake.com/checkout_confirmation.php, however, I had to change:

 

//CGDiscountSpecials start

echo ' <td class="main" align="right" valign="top">' . $currencies->display_price_nodiscount($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .

' </tr>' . "\n";

//CGDiscountSpecials end

 

-to-

 

//CGDiscountSpecials start

echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .

' </tr>' . "\n";

//CGDiscountSpecials end

 

 

Can someone please help me find out how I can get the correct subtotals through checkout? I assume that the ?Order Totals? module needs to be changed.

 

Thanks.

 

matthew

i supposte it's BTS that do something wrong.

i've tested now on my local web server and CGDiscSpec.. works, even on checkout_confirmation.php.

 

try testing this contribution on a clean 2.2 ms2 verision of oscommerce.


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites

I suspect that it will work on a clean install of MS2, however, the BTS is important because I've customized the hell out of my OSC. Any ideas of what might be wrong, any help would be welcomed.

 

Matt

 

www.vmwake.com

Share this post


Link to post
Share on other sites
Hi Davide

 

1st I think it is a great contrib, but I will also need to specify product categories discounts for customers groups.

 

But first I have some trouble getting the contrib working. It installs well -> when you a brose a category of say 100 products, It shows only the first page and linsk to go to other pages to see more products is missing.

 

What am I doing wrong.?

 

Thanks

 

SSD

this is because you are using version 1.2

i have a 1.3PRE that fix this bug, but i cant find NO-ONE (in 1 month!!) that test this contribution. i'm using this (1.3pre), and it seems to work, but i wont someone to test it better.

if you want i can mail this contrib to you (sen me a mail)

if you test it i'll post the 1.3 to this comunity, before your test!.

Davide

 

Thx for the update. I can be yor tester for 1.3PRE. Give me the url to download it when you are ready

 

SSD ;)

Share this post


Link to post
Share on other sites

Right I am using the cgdiscount1.3 and osc 2.2ms2 newest I think and on a clean install I am getting everything except new products for month to work it show the default prices I have, although specials and whats new reflect actual prices changes, and when I click on any of these products the prices change to the gropu price I have selected.mmmm.

 

Any thoughts or tips plz on this


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

just to be a bit clearer osc2.2ms2, cgdiscount v1.3 default group prices work fine but wholesale group new products listed for month are showing same prices as default group specials and whats new are ok.

 

If i select a category prices are fine in products lis show wholesale prices.

 

Can anyone throw any light on this problem have had this on 3 sites now and I have to remove the contrib to get em working ok for people.

 

thx in advance


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Hey all,

 

Finally had a chance to upgrade this contribution to the latest hoping it would solve the problem I had with previious versions of this contrib.

 

the problem is to do with special priced items. When a group sees a discounted item it not only offers the group discount price from the list price but also discounts the special price upto the point where the item is added into the cart.

 

When the item is added to the cart the item returns to the normal price with just the special discount..

 

I think i stated this problem more striaght foward in this previous post for an earlier contribution.

 

QUOTE 

Regular Customer: no group attached.

 

item 1 regular price $24.99 and now on Special for $22.99

 

 

 

 

QUOTE 

Discount Group Member now logged in and shopping for exact same item with 25% group discount rate set in customers_groups.php

 

He will see Regular Price: $18.74 and now on Special for $17.24 and adds it to the cart and then the price changes to $22.99 (the regular member sale price).

Share this post


Link to post
Share on other sites
just to be a bit clearer osc2.2ms2, cgdiscount v1.3 default group prices work fine but wholesale group new products listed for month are showing same prices as default group specials and whats new are ok.

 

If i select a category prices are fine in products lis show wholesale prices.

 

Can anyone throw any light on this problem have had this on 3 sites now and I have to remove the contrib to get em working ok for people.

 

thx in advance

thanks fot telling me this bug.

 

this should be the fix.

 

use this code for the file catalog/incluedes/modules/new_products.php

 

(remember to tell me if this works for you, and if you find any other bug!!!)

 

<?php
/*
 $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- new_products //-->
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 new contentBoxHeading($info_box_contents);
 
 //CGDiscountSpecials start
 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
   $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
   $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 }
 //CGDiscountSpecials end

 $row = 0;
 $col = 0;
 $info_box_contents = array();
 while ($new_products = tep_db_fetch_array($new_products_query)) {

$new_products['products_name'] = tep_get_products_name($new_products['products_id']);

//CGDiscountSpecials start
   if ($new_price = tep_get_products_special_price($new_products['products_id'])) {
    $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="33%" valign="top"',
                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br><s>' .  $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>');
} else {
 $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="33%" valign="top"',
                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));
}
   //CGDiscountSpecials end

   $col ++;
   if ($col > 2) {
     $col = 0;
     $row ++;
   }
 }

 new contentBox($info_box_contents);
?>
<!-- new_products_eof //-->


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites

Right on the face this seems have sorted the problem very much a thank you there, I will play around with the contrib like many others and see if I can brake it for you.

 

But good work nice contrib.

 

Thx


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Another possible bug?

 

Right I have seen this a number of times before, but now the worst problem I had is sorted what would you say was the solution to this issue I have I have included a snap shot of the problem but when you dont log in and still add to cart when you get as far as cart it displays price of item.snapshot1.gif

 

Thx in advance

 

Also It is a basic install of osc2.2ms2 and sts1.8 and your contribute nothing else

 

Regards

Elwyn


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×