Jump to content
swguy

[Contribution] Quantity Discounts by That Software Guy

Recommended Posts

Looking around on my test site of Phoenix 1.0.6.0 I saw something that is not right.  Tried to figure it out but with no luck.  Need some help please. 

I only waited the code to work on one group (category) of items [14].  In steed it is showing up on every product page.  1st image is my test item, it shouldn't be there.  2nd image is the product I want it to be on.  the 3rd image is the category that I want to use. 

This is the code I changed in the -  includes/modules/order_total/ot_quantity_discount.php  (based on the one I had under OSC 2.3.4)

    // Add categories you wish to exclude to this list.
    // Go to Admin->Catalog->Categories/Products and look
    // at the left hand side of the list to determine
    // category id.   Note that 99999 and 99998 are just given
    // as examples.
    function exclude_category($category) {
        switch($category) {
           case 14:
//           case 99998:
                return false;
        }
        return true;
    }

How to fix and get it show under just under the Wild Berry Incense category?

Thanks for the help.

I also included the file

test item.jpg

correct item.jpg

data base categirues.jpg

ot_quantity_discount.php

Share this post


Link to post
Share on other sites

Please grab the latest copy of Quantity Discounts here: https://apps.oscommerce.com/Apps&QdusL&quantity-discounts-for-osc-phoenix 

I tested category exclusions and it worked for me with the latest osC Phoenix from Github. 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites

I down loaded the file.  I uninstalled QD from content and order total.  Than I uploaded all files.  reinstalled QD in order total and then content.  Edited the ot_quantity_discount.php to:

    // Add categories you wish to exclude to this list.
    // Go to Admin->Catalog->Categories/Products and look
    // at the left hand side of the list to determine
    // category id.   Note that 99999 and 99998 are just given
    // as examples.
    function exclude_category($category) {
        switch($category) {
           case 17:
//           case 99998:
                return false;
        }
        return true;
    }

Looked at my site and the same thing.  It did not fix the issue.  Sorry. 

Here is my site if you want to look.  http://www.ladybuggardendecor.com/temp.ladybuggardendecor.com/index.php

My test site is under the temp..  The part in the front is the old OSC 2.3.4 where it is still working. 

I get the listings in all product detail pages weather I edit the above file or not.  I can leave the file as is from the new install upload and get the same thing.  The modified file has no change on the outcome. 

Let me know what else you need.  I will be happy to help. 

Thanks for your time and trouble. 

 

 

Share this post


Link to post
Share on other sites

I misunderstood your issue - you're saying that the marketing text isn't excluded (it's not a discounting issue, it's a marketing text issue). 

The answer is, you have to customize other things if you take advantage of the user exits.  There's an example in the help of how to do this.

https://www.thatsoftwareguy.com/osc_quantity_discounts.html#marketing

Go down to the second note below this link.  


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites

That was it - I love you - I would have never put it to gather.  Many many thanks.  😃

 

Share this post


Link to post
Share on other sites

@swguy

Updated Phoenix today to 1.0.6.1.  I get these errors when I go to the product page.

Warning: Use of undefined constant MODULE_CONTENT_PI_SWGUY_QD_MARKETING_TEXT_STYLE - assumed 'MODULE_CONTENT_PI_SWGUY_QD_MARKETING_TEXT_STYLE' (this will throw an Error in a future version of PHP) in /includes/modules/content/product_info/templates/tpl_cm_pi_swguy_qd_marketing.php on line 2

Warning: Use of undefined constant MODULE_CONTENT_PI_SWGUY_QD_MARKETING_TEXT_STYLE - assumed 'MODULE_CONTENT_PI_SWGUY_QD_MARKETING_TEXT_STYLE' (this will throw an Error in a future version of PHP) in /includes/modules/content/product_info/templates/tpl_cm_pi_swguy_qd_marketing.php on line 2

 

Share this post


Link to post
Share on other sites

Change MODULE_CONTENT_PI_SWGUY_QD_MARKETING_TEXT_STYLE to MODULE_CONTENT_PI_SWGUY_QD_MARKETING_CONTENT_STYLE

in includes/modules/content/product_info/templates/tpl_cm_pi_swguy_qd_marketing.php


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
14 minutes ago, swguy said:

Change MODULE_CONTENT_PI_SWGUY_QD_MARKETING_TEXT_STYLE to MODULE_CONTENT_PI_SWGUY_QD_MARKETING_CONTENT_STYLE

in includes/modules/content/product_info/templates/tpl_cm_pi_swguy_qd_marketing.php

same error

Warning: Use of undefined constant MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE - assumed 'MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE' (this will throw an Error in a future version of PHP) in /includes/modules/content/product_info/templates/tpl_cm_pi_swguy_qd_marketing.php on line 2

Warning: Use of undefined constant MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE - assumed 'MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE' (this will throw an Error in a future version of PHP) in /includes/modules/content/product_info/templates/tpl_cm_pi_swguy_qd_marketing.php on line 2

Share this post


Link to post
Share on other sites

You have a copy and paste error.  Please reread my instructions. 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
6 minutes ago, swguy said:

You have a copy and paste error.  Please reread my instructions. 

I'm not following.  I didn't copy or past.  I just took out TEXT.  Other than it was a pure file.

<?php if ( (MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE == 1) || (MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE == 2)) { ?>

Share this post


Link to post
Share on other sites
2 hours ago, dculley said:

I'm not following.  I didn't copy or past.  I just took out TEXT.  Other than it was a pure file.

<?php if ( (MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE == 1) || (MODULE_CONTENT_PI_SWGUY_QD_MARKETING_STYLE == 2)) { ?>

TEXT -> CONTENT

Share this post


Link to post
Share on other sites

@Supertex

TEXT in place I get this.  Only thing out of place is the warning. 

image.png.c45d051ad211d722ef3f3343af01b3cf.png

When I replace the TEXT to CONTENT I get this with out warnings. But I loose the lines.  I can live with this. 

image.png.6a60759f47bbe8886dc1e53b7fc4d0b0.png

Thanks for the help, greatly appreciated. 😊

Share this post


Link to post
Share on other sites

i am getting this (wrong position of discount), but i did not manipulate any depending file (Phoenix 1.0.7.1)
image.jpeg.b70c8386ee6018452a19fb903742447b.jpeg


Dum spiro spero 

Share this post


Link to post
Share on other sites

You can adjust the sort order of the discount from admin > modules > order totals. 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites

Thx, that does it (of course)

 


Dum spiro spero 

Share this post


Link to post
Share on other sites

Glad you're having fun with Phoenix! 


Contributions: Better Together and Quantity Discounts for osCommerce 2.3.x and Phoenix. See my profile for more details.

Share this post


Link to post
Share on other sites
Posted (edited)

Great thing, used over 15 years the old one 😉
Is it possible to place the information formatted , more "eye-friendly",may be centered or without/different frames ?

Here is what i had so far
image.jpeg.aa233dd7817a3586ef475561b68632ff.jpeg

And the discount may be in RED ?

Edited by EGLTD

Dum spiro spero 

Share this post


Link to post
Share on other sites
Posted (edited)

image.jpeg.1e4d6a519c16ddf166cef20a322c3c46.jpeg

Edited by EGLTD

Dum spiro spero 

Share this post


Link to post
Share on other sites

Hello @swguy

I have a question,

I have Purchase without account Phoenix  - https://apps.oscommerce.com/gBmPX&purchase-without-account-phoenix module and when I am on guest account - I see quantity discount in checkout process, but I don't want to give discount for guest, just for users, which were bought something earlier. Could you tell me, what is need to edit to get this effect?

If I should to set quantity discount only for registered users? Or something else?

Newest Phoenix.

Thx.

Edited by Gold1s

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

×