Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buying one item from a list of products, allows you to buy any other product from that brand at a %discount


bruyndoncx

Recommended Posts

Hello everyone,

 

I'm trying to get my head around a year-end promo that runs in the store and that I would like to offer online too.

 

Buying one item from a list of products, allows you to buy any other product from that brand at a %discount.

 

So Alessi has a flyer with about 200 products when you buy one of these you can buy another products of the same or lesser value with a 50% discount. We have about 700 alessi products to choose from so it is not feasible to setup a xsell at the individual product level.

 

Currently, the products are all in their proper different categories, if needed, I could link them to a second category just holding these promo items.

 

Do you know of a contribution that allows for a setup with an order total module that would calculate the discount correctly.

 

Ideally during the shopping process when a product from the gift flyer is choosen, it would allow the shopper interactively to select a second product at a discount, but I'm afraid that would be rather complicated.

 

Any brilliant ideas on how to work this into oscommerce ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi Carine

 

Just reading this bit complicated for my brain but was thinking if it could be done for a complete extra category

 

well anyhow makes for interesting reading

 

http://addons.oscommerce.com/info/6733

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

exactly what I'm currently doing - I'm not familiar with that contribution, quite a long readme ...

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

exactly what I'm currently doing - I'm not familiar with that contribution, quite a long readme ...

Well know from the past the guy as gained a lot of respect for good coding

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

I emailed @@swguy as described on his site yesterday eve for advise on using better together or big chooser.

I haven't had a response back yet.

In the meantime I installed better together to see how it works and could generate pretty much what I need, but somehow the actual calculation with taxes messes things up. I'll have another look tomorrow to see if I made a silly copy/paste/adapt mistake.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@@swguy

the function get_tax_rate_from_desc is causing the problem.

I have several tax groups defined (for the integration with our accounts so that different product groups are distinguished and booked differently in the backoffice). So I have a lot of entries with the same tax description.

I solved it by adding a 'distinct' to the sql clause

    $tax_query_str = "SELECT distinct tax_rate
				  FROM " . TABLE_TAX_RATES . "
				  WHERE tax_description = '" . $tax_desc . "'";

Now, the basic setup add_prod_to_prod works fine for me.

 

Back to work on the the add_cat_to_man case ...

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I've progressed with better together and extended the logic to support category to manufacturer and article to manufacturer.

It is still a work in progress, not clean yet, but it does seem to do what I need right now.

The calculated discounts are correct which is the most important, only now I need to figure out how to promote this nicely in the shop.

 

the big discount module does almost what is needed, but not quite yet.

It is however usefull for other kinds of discounts like buy 1 get 10%, buy 2 get 20% buy 3 get 25%

 

it has been a steep learning curve and short nights of sleep but well worth the effort :thumbsup: all thanks to @@swguy !

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@@bruyndoncx you are a champion coder! I went ahead and integrated this feature into Big Chooser so it's more generic - I think people will like it. Thanks for the positive feedback.

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...