Jump to content
boxtel

2gether Discount

Recommended Posts

I have another problem with this contribution. Maybe somebody can help.

 

It all works perfectly with products without attribute, but, once this contribution is added, I can not add any product with attribute (including downloadable products) in my shopping cart, even if they are not part of a bundle:

-if I have a product with only one attrible (=downloadable), it never gets added to the cart.

-if the product has several "versions" (for example several sizes or colors), the main product gets added, without any attribute.

 

I know that this has been discussed here before, but has anybody been able to solve this issue? It would be very nice to know what to change to solve this problem.

 

I don't want to bundle any products with attribute, only to be able to have products with attribute being normally put in the cart. :(

 

Thank you very much

Edited by niviche

Share this post


Link to post
Share on other sites

I seem to have solved my problem (see post above). I don't know if it will work for everybody, but, if you the 2gether contribution conflicts with products with attributes in your store:

 

change in catalog\includes\application.top:

 

the whole

case 'add_product'

till

break;

 

by:

 

 case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//if (tep_get_products_stock($HTTP_POST_VARS['products_id']) > 0) $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}
if (isset($HTTP_POST_VARS['buy_tinn_add']) && is_numeric($HTTP_POST_VARS['buy_tinn_add'])) {
// if (tep_get_products_stock($HTTP_POST_VARS['buy_tinn_add']) > 0) {
$cart->add_cart($HTTP_POST_VARS['buy_tinn_add'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['buy_tinn_add'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
// }
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;

Share this post


Link to post
Share on other sites

Hi,

Just added this contribution and seems to be working well.

Wanted to know where i can chage the styles for the display on product_info.php

 

I dont want it to use pageHeading class as this is customised with a background image.

 

Can you help? Click here to see what i mean

Share this post


Link to post
Share on other sites

I have a problem. Where extactly is it that I am to "put products 2gether"? I have looked in all of the menus in admin, but the only reference that I see to the contrib is in the order total modules and the only options that I have are enable and sort order.

 

any ideas where I might have gone astray?


If it was easy, anyone could do it!

Share this post


Link to post
Share on other sites

I have scoured the forum and can't seem to find the solution.

 

I have the 2gether module installed correctly (I believe)... I can set up the appropriate products on my admin page, the "2gether discount" info shows up correctly on the product_info page, and the 'buy now' correctly adds both items to the shopping cart.

 

My problem is that the discount does not show up during checkout. I have tried re-arranging my sort orders and this did not resolve the issue.

 

i've also tried uninstalling and reinstalling and that doesn't work.

 

I have the Credit Class/Gift Voucher add-in, and I use product attributes. I also use a zip code tax mod.

 

I tried adding an HTML comment into my order_total/ot_together.php file, and the comment is not passed through to my source code when I am on the checkout_payment page

 

Where can I start to troubleshoot the problem?

Share this post


Link to post
Share on other sites
I have a problem. Where extactly is it that I am to "put products 2gether"? I have looked in all of the menus in admin, but the only reference that I see to the contrib is in the order total modules and the only options that I have are enable and sort order.

 

any ideas where I might have gone astray?

 

Did you modify your admin/includes/boxes/catalog.php file? This file has the code that inserts the actual link under the Catalog heading on your admin screen.

Share this post


Link to post
Share on other sites
I have scoured the forum and can't seem to find the solution.

 

I have the 2gether module installed correctly (I believe)... I can set up the appropriate products on my admin page, the "2gether discount" info shows up correctly on the product_info page, and the 'buy now' correctly adds both items to the shopping cart.

 

My problem is that the discount does not show up during checkout. I have tried re-arranging my sort orders and this did not resolve the issue.

 

i've also tried uninstalling and reinstalling and that doesn't work.

 

I have the Credit Class/Gift Voucher add-in, and I use product attributes. I also use a zip code tax mod.

 

I tried adding an HTML comment into my order_total/ot_together.php file, and the comment is not passed through to my source code when I am on the checkout_payment page

 

Where can I start to troubleshoot the problem?

 

Never mind, I think I found the solution here:

Share this post


Link to post
Share on other sites

Hello again,

 

A few pages back I remarked that I was having order total discrepancies. That was while the client was using paypal for payment method. Since I could not figure out where the discounted total was supposed to be passing the new total to paypal I dropped support for 2gether, since Amanda didn't have advice on how to fix it because she doesn't use paypal.

 

Well, now my client is now using a credit card processor (he doesn't use paypal AT ALL) and wants to use 2gether. After thorough testing the same 'problem' exists. The discounted 2gether price is NOT getting passed to the credit card processor. And the cards are getting charged the non-discounted price. I also have a promotional code module installed and it works without a hitch. Either by itself, or when used in combination with 2gether - the 2gether discount is not being passed to the final order total that is processed by the credit card mob.

 

Amanda, I'm begging you could you please point me in the correct direction to pinpoint where the values are or not being passed? Where do I start? How do I track this bug/issue down?

 

many thanks in advance.

Zoe

Edited by irimib

Share this post


Link to post
Share on other sites

Hello -

 

First I'd like to say thank you for sharing your time and knowledge to create this contribution.

 

Unfortunately, I've gone through my install instructions several times and I've read through this forum thread and I cannot seem to find where my problem lies :(

 

I am getting various different errors in my Admin stating that they are calling undefined functions from admin/2gether.php (ie: tep_get_products_price() and tep_set_together_status() and tep_get_products_image() are all fatal errors currently). I cannot even activate a 2gether listing to test it until I can get this figured out. The only mention of this I can find in this thread is followed with an "Ok - fixed that - now I have this error" type of follow-up message with no mention as to how the problem was fixed. I'm not very well versed in PHP yet, so I am at a complete loss as to what it is I have missed or that I need to do in order to get things up and running.

 

The other question I have - I noticed that once I added a product as either Product 1 or Product 2 it is then no longer available for me to choose for another 2gether discount. I am hoping this is due to something I've done incorrectly - as the reason I need the module is we have one product that, if purchased with any one of a list of products is free. IE - Product ID 46 is $3.00 unless the customer purchases any or all of the following product ID's - 44, 47, 58, 53, 42, 121, 79 or 105 - then product ID 46 is Free. Is there a way for this contribution to allow me to do that?

 

Amongst several other great contributions I am running Master Products and Separate Price per Customer and STS - could my problems have to do with compatibility issues? Has anyone else out there been able to sucessfully use this contrib with any or all of the above?

 

Thank you again and I hopefully await a response telling me I missed something during install that, if I do it, will get everything working the way I need it to :thumbsup:


~Tracy
 

Share this post


Link to post
Share on other sites

Hello -

 

First I'd like to say thank you for sharing your time and knowledge to create this contribution.

 

Unfortunately, I've gone through my install instructions several times and I've read through this forum thread and I cannot seem to find where my problem lies :(

 

I am getting various different errors in my Admin stating that they are calling undefined functions from admin/2gether.php (ie: tep_get_products_price() and tep_set_together_status() and tep_get_products_image() are all fatal errors currently). I cannot even activate a 2gether listing to test it until I can get this figured out. The only mention of this I can find in this thread is followed with an "Ok - fixed that - now I have this error" type of follow-up message with no mention as to how the problem was fixed. I'm not very well versed in PHP yet, so I am at a complete loss as to what it is I have missed or that I need to do in order to get things up and running.

 

The other question I have - I noticed that once I added a product as either Product 1 or Product 2 it is then no longer available for me to choose for another 2gether discount. I am hoping this is due to something I've done incorrectly - as the reason I need the module is we have one product that, if purchased with any one of a list of products is free. IE - Product ID 46 is $3.00 unless the customer purchases any or all of the following product ID's - 44, 47, 58, 53, 42, 121, 79 or 105 - then product ID 46 is Free. Is there a way for this contribution to allow me to do that?

 

Amongst several other great contributions I am running Master Products and Separate Price per Customer and STS - could my problems have to do with compatibility issues? Has anyone else out there been able to sucessfully use this contrib with any or all of the above?

 

Thank you again and I hopefully await a response telling me I missed something during install that, if I do it, will get everything working the way I need it to :thumbsup:


~Tracy
 

Share this post


Link to post
Share on other sites

ok, I have the contrib installed, second time around, but now I am getting this error and I cant seem to figure out what is the problem. Probably something small that I am over looking, but here is the error:

 

Parse error: parse error, unexpected '}' in /home/lotions2/public_html/osCommerce1/catalog/admin/includes/boxes/catalog.php on line 35

 

and here is my catalog.php

 

<?php

/*

$Id: catalog.php,v 1.21 2003/07/09 01:18:53 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- catalog //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_CATALOG,

'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));

 

if ($selected_box == 'catalog') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .

//kgt - discount coupons

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>'.

'<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>' );

//end kgt - discount coupons

 

'<a href="' . tep_href_link(FILENAME_2GETHER, '', 'NONSSL') . '" class="menuBoxContentLink">' . '2gether specials' . '</a><br>' .

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- catalog_eof //-->

Edited by itfitz

If it was easy, anyone could do it!

Share this post


Link to post
Share on other sites

ignor this, I just need a notification when there is an update.


If it was easy, anyone could do it!

Share this post


Link to post
Share on other sites

ok, I fixed that problem and have now moved on to a new one.

 

I pulled out the } at line 35 and now I get this error:

 

Parse error: parse error, unexpected $ in /home/lotions2/public_html/osCommerce1/catalog/admin/includes/boxes/catalog.php on line 43

 

problem is, there is no line 43.


If it was easy, anyone could do it!

Share this post


Link to post
Share on other sites

Is there a way to modify the below code so that if you have a together discount in your cart already, and the customer is viewing other products, if one of the two products in the cart is included in other 2gether discounts the customer won't see that?

 

I have an informational packet that, when purchased with one of the products in the packet is free, otherwise $3.00

 

So - let's say informational packet is product_1_id = 1

let's say the products in the packet are product_2_id = 2, 3, 4, 5, 6 and 7

 

So - the customer looks at product id 2, sees the 2gether discount and chooses to add it to cart. So now the cart has product id 1 for free and product id 2.

 

Now the customer goes and looks at product id 3. This product too can be purchased with product id 1, causing product id 1 to be free. But I don't want the customer to be able to do that.

 

So basically - I need to see if product id 1 is in the cart as part of a together discount, and if so, not show any other 2gether discounts on the product_info.php page that have product id 1 in them.

 

I don't want to stop them from buying the 2gether discount though if they choose to purchase product 2 for example, and then when they purchase product 4 they choose to "buy now" on the 2gether discount. I just want to stop the discount from happening more than one time.

 

Make sense? :huh:

 

Here's the code from the contrib. page that I'm asking about modifying:

// disable 2gether products entry
$together_query = tep_db_query("select status from " . TABLE_2GETHER . " where status = 1 and (product_1_id = '" . tep_get_prid($order->products[$i]['id']) . "' or product_2_id = '" . tep_get_prid($order->products[$i]['id']) . "')");
if (tep_db_num_rows($together_query) > 0) {
tep_db_query("update " . TABLE_2GETHER . " set status = 0 where status = 1 and (product_1_id = '" . tep_get_prid($order->products[$i]['id']) . "' or product_2_id = '" . tep_get_prid($order->products[$i]['id']) . "')");
}

 

Thank you


~Tracy
 

Share this post


Link to post
Share on other sites

is there any usable install nfo file available?? because i have a full modded shop, and with this "documentation" its quite impossible to install this (anyway) great contribution! please help! :(

 

cheerz,

 

B.

Share this post


Link to post
Share on other sites

Hi,

 

I have installed 2gether discount on my website, its working perfectly, I been to your site, I notice you have the 2gether discount page to have all 2gether product in 1 page-http://www.crystallight.com.tw/2gether.php. I would like to have this on my site, can you show us?

 

Thanks in advance

 

Samantha

Share this post


Link to post
Share on other sites

Hi Amanda,

 

I have been using your contribution quite some time, genius creation, but I need the 2gether discount to be show although 0 money 0% discount, currently the 2gether discount will only be shown if have atleast 1 discount, do you have any idea how to fix this?

 

Thanks in advance

 

Samantha

Share this post


Link to post
Share on other sites

Dear Forum,

 

I have installed this contribution on my test site and it seems to work okay. However items with custom attributes such as size or colour do not seem to have a discount applied.

 

Is this normal and what can I do to fix it?

 

Thank you

 

David

Share this post


Link to post
Share on other sites

Hi all,

 

I've been back through this thread and have seen a few people mentioning problems with attributes etc, and a couple with reference to the QT Pro contribution being non compatible.

 

Is this still the case or are the more recent updates now ok with QT Pro?

 

This is installed on the store along with a multitude of other contributions so I thought before I started I'd check what the current status was!

 

Thanks in advance,

Sadie

Share this post


Link to post
Share on other sites

I have what seemes to be a big problem. After installing 2gether dicount contribution i get an error:

 

"1054 - Unknown column 'c.categories_status' in 'where clause'

 

select categories_name from categories_description cd left join categories c on cd.categories_id = c.categories_id where c.categories_status = '1' and cd.categories_id = '21' and cd.language_id = '1'

 

[TEP STOP]

 

"

 

after clicking on ANY product through my entire store. When i try to restore a backup of OSC to start over the entire OSC crashed. Only way i got i back up running was to manually download the backup *.sql and run an SQL in PHPmyadmin. Now im back to the same problem as above.

 

Any ideas?

 

-Nathan

Share this post


Link to post
Share on other sites

I have what seemes to be a big problem. After installing 2gether dicount contribution i get an error:

 

"1054 - Unknown column 'c.categories_status' in 'where clause'

 

select categories_name from categories_description cd left join categories c on cd.categories_id = c.categories_id where c.categories_status = '1' and cd.categories_id = '21' and cd.language_id = '1'

 

[TEP STOP]

 

"

 

after clicking on ANY product through my entire store. When i try to restore a backup of OSC to start over the entire OSC crashed. Only way i got i back up running was to manually download the backup *.sql and run an SQL in PHPmyadmin. Now im back to the same problem as above.

 

Any ideas?

 

-Nathan

Share this post


Link to post
Share on other sites

Thanks for writing the contribution, I'm sure it will be useful.

 

2 queries:

 

1) In the install instructions #8 says to 'activate the order total module'

How do I do this? I've added all the new files, double- and triple-checking those in the order total folders and they're definitely there.

When I look in the admin and click on Modules-Order Total, there's nothing there for 2gether discount.

I assume that I'm supposed to put the correct sort order that I wish in here, but there's nothing. Have I missed something?

 

2) I already have QT Pro installed and I've got a problem with application_top.php

Does anyone have a working version of this for me please?

 

Thanks,

 

Tamsyn

Share this post


Link to post
Share on other sites

Hi guyz... same problem here..... how can we setup QTPRO with 2gether

 

qtpro

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])) {

//++++ QT Pro: Begin Changed code

$attributes=array();

if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {

$attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);

foreach ($attrlist as $attr) {

list($oid, $oval)=explode('-',$attr);

if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)

$attributes[$oid]=$oval;

}

}

if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {

foreach ($HTTP_POST_VARS['id'] as $key=>$val) {

if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)

$attributes=$attributes + $HTTP_POST_VARS['id'];

}

}

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);

//++++ QT Pro: End Changed Code

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

 

2gether

 

//// bof: Added 2gether (contribution 3929)

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

if (tep_get_products_stock($HTTP_POST_VARS['products_id']) > 0) $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

if (isset($HTTP_POST_VARS['buy_tinn_add']) && is_numeric($HTTP_POST_VARS['buy_tinn_add'])) {

if (tep_get_products_stock($HTTP_POST_VARS['buy_tinn_add']) > 0) {

$cart->add_cart($HTTP_POST_VARS['buy_tinn_add'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['buy_tinn_add'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

//// eof: Added 2gether (contribution 3929)

 

 

How make this work "2gether"? :)

Share this post


Link to post
Share on other sites

and why the price with the discount isnt calculte in checkout? all works fines but the checkout is being doing with the original prices of the products....

 

How to show the discount in shopping cart?

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

×