Jump to content
Sign in to follow this  
saletco

Buy_Two_Module

Recommended Posts

Hi

 

this is easy. I did not integrat this with admin, but in code.

 

Open buy_two_module.php (in modules) and find line 59/60

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = ''; // this is the value

 

 

change to

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = 'and p.products_price > 0'; // this is the value 0 set to any value as mininmum

 

Let me know if it works for you.

 

Kai

Share this post


Link to post
Share on other sites

Hey all-

 

Anyone got any ideas here? I have this module installed, see it in admin, and no matter what settings I change, I just can't seem to get it to show up. I have no errors or blank pages. Have installed it several times including SQL. Nothing shows up. Display errors are on as well.

 

I recently tried to install another similar module, which caused my store to crash. I re-installed, re-coded several other of my previously installed contribs and figured I'd give an update, see if people are aware of any issues of using contribs together.

 

I use a product sort order contrib (can see a few pieces of that code in product_info.php, most of the rest is in admin)

STS_TEMPLATE - kind of thinking that might be the culprit...

 

Individual Product Shipping- Lots of that code is in the same files Buy Two wants me to modify - shopping_cart.php, product_info.php and pretty much each other one.

 

On the fly Thumbnailer- said in buy two directions to edit popup_image.php, so I did. However, it doesn't make a difference.

 

Here is my admin in jpeg format.

 

If anyone has any ideas, that'd be really great as I am desperate to get this mod going:

 

 

Picture-1-copy.jpg

Share this post


Link to post
Share on other sites
Hi

 

this is easy. I did not integrat this with admin, but in code.

 

Open buy_two_module.php (in modules) and find line 59/60

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = ''; // this is the value

change to

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = 'and p.products_price > 0'; // this is the value 0 set to any value as mininmum

 

Let me know if it works for you.

 

Kai

 

 

 

*************

 

I changed the code like you told me and I receive the following error message:

 

*** AS FOLLOW ***

 

1064 - You have an error in your SQL syntax near 'p.products_price > 0' at line 1

 

select p.products_id from products p left join products_description pd on p.products_id=pd.products_id, products_attributes pa where p.products_id != pa.products_id and p.products_tax_class_id='1' and p.products_id!='2' and p.products_status='1' and pd.products_name LIKE '%T%e%s%' p.products_price > 0

 

[TEP STOP]

 

*** ENDS ***

 

Thanks for taking the time to help me !

I should try to get it going today, if I have time....

 

Ray


Martin Raymond

Xtreme Medias, Owner

Share this post


Link to post
Share on other sites

Still can't get it to work.

 

Just for clarification, I have followed each step in teh instructions to the T. Code is in the right places. I have no errors and even have display errors on.

 

I updated my thumbnailer and several other contribs. Nothing shows in my store. I have the module in admin, as I posted my settings before.

 

I just don't see the contrib working in the actual store.

 

Can anyone help, please? :D

Share this post


Link to post
Share on other sites

Hi guys, I need help

 

I tried to put a minimum value in the buy two module in order not to bundle any products with a 0$ price.

But when I do, I get the following message:

 

*** AS FOLLOW ***

 

1064 - You have an error in your SQL syntax near 'p.products_price > 0' at line 1

 

select p.products_id from products p left join products_description pd on p.products_id=pd.products_id, products_attributes pa where p.products_id != pa.products_id and p.products_tax_class_id='1' and p.products_id!='2' and p.products_status='1' and pd.products_name LIKE '%T%e%s%' p.products_price > 0

 

[TEP STOP]

 

*** ENDS ***

 

Here is the code I replaced...

 

 

I opened buy_two_module.php (in modules) and found line 59/60

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = ''; // this is the value

 

 

and changed to

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = 'and p.products_price > 0'; // this is the value 0 set to any value as mininmum

 

also tried

 

// CUSTOM EXTENSIONS !!! If you need fill out - if not do ''

$bundle_custom_extensions = 'where p.products_price > 0'; // this is the value 0 set to any value as mininmum

 

Anybodu can help!!!@@##$%&


Martin Raymond

Xtreme Medias, Owner

Share this post


Link to post
Share on other sites

Hi,

 

could you tell me the version you are using?

 

it seems that there is an "and" missing - are u sure u tried and products.... > ? not only witout the and?

 

Do you have a link to your shop?

 

Regards

Kai

Share this post


Link to post
Share on other sites

Yes, I did use the ''and'' and also tried ''where'' without results

 

I use MS2 2.2, and the link to my shop is :

 

www.xmedias.ca

 

The message will not appear because i took it out.

Thanks for your help, would like to resolve the problem...

 

Ray


Martin Raymond

Xtreme Medias, Owner

Share this post


Link to post
Share on other sites

Hi,

This is a real good contribution.

I have just added the latest version and all seems to come up fine.

 

When I visit the site I am getting this error

Warning: mysql_query(): Unable to save result set in /var/www/html/includes/functions/database.php on line 44

2008 - MySQL client run out of memory

 

select p.products_id from products p , products_attributes pa where p.products_tax_class_id='2' and p.products_id!='17286' and p.products_status='1'

 

[TEP STOP]

 

2013 - Lost connection to MySQL server during query

 

select count(*) as total from sessions where sesskey = '37ebced2b920406bb0a4ff44deb911b4'

 

[TEP STOP]

 

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

Can you please help, how to fix this?

Kunal

Share this post


Link to post
Share on other sites
Yes, I did use the ''and'' and also tried ''where'' without results

 

I use MS2 2.2, and the link to my shop is :

 

www.xmedias.ca

 

The message will not appear because i took it out.

Thanks for your help, would like to resolve the problem...

 

Ray

Yes, I did use the ''and'' and also tried ''where'' without results

 

I use MS2 2.2, and the link to my shop is :

 

www.xmedias.ca

 

The message will not appear because i took it out.

Thanks for your help, would like to resolve the problem...

 

Ray

 

 

i dunno if this works...but i tried and it gave me this problem

064 - 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 'by rand(5942) DESC limit 1' at line 1

 

select p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price, p.manufacturers_id from products p left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = '68' and p.products_id!='16' and p.products_tax_class_id='0' and p.products_price > 0order by rand(5942) DESC limit 1

 

so anyway i changed $bundle_custom_extensions = 'and p.products_price > 0'

to $bundle_custom_extensions = 'and p.products_price > 0 '

with a spacing behind the 0

 

anyone try it?mine work though

 

take care god bless

Share this post


Link to post
Share on other sites

Is there some way to limit the which category to be used for pairing?

also on one of my sites I wanted to allow pairing only in the same sub category,how to achive this?

can you help!

 

Kunal

Share this post


Link to post
Share on other sites

Hi. I can't seem to get buy_two to work if the items are downloadable.

 

I have two downloadable items, and I want the client to be able to download them both if they are bundled.

 

Also, for some reason if I turn off the discount mode, it doesn't add both products.

 

These are two separate questions.

 

Any ideas?

 

Thanks. This module is awesome.

 

Tom

Share this post


Link to post
Share on other sites
ok thanks

 

i will install this one before buy_two_module

 

X-Sell v2-MS2 - Cross Sell for MS2

http://www.oscommerce.com/community/contri...l/search,x-sell

 

But it's not work with buy_two_module or i dont know how to work with it

 

I most use witch one with your contribution ?

 

It's not a problem for me to uninstall X-Sell v2-MS2 - Cross Sell for MS2 and install the good one

The module looks exactly what I want, and installation intructions is also very clear.

 

I also have the same problem as 'yopyop22', the Buy-Two is display the bundle products in random, not the products defined by the Xsell module. So now the product pages display two sets of "We recommend:", one by Xsell and one by Buy_Two.

 

I have made sure both switches are on, i.e. Use the Buy_Two_Module ---> yes

and

Want to make use of X-Sell Contrib? ---> yes

 

 

I have check the datebase TABLE_PRODUCTS_XSELL, and I can see there are plenty of records and the data have no problem.

 

I then checked the core file of the buy_two_func.php, I can see it queries into the TABLE_PRODUCTS_XSELL, but not sure how the value bundle_product_b was obtained according to this query result. There is also a switch: XSELLONLYYESNO=='only' which dose not seems to be related to any of the configuration settings. (Please DO Forgive for my very limited knowledge of PHP).

 

 

Please can somebody give me some help.

Share this post


Link to post
Share on other sites

I receive the following error when trying to switch to the discount mode:

 

1146 - Table 'ipo0635310262844.TABLE_BUY_TWO_BUNDLES' doesn't exist

 

select products_id from TABLE_BUY_TWO_BUNDLES where bundle_product_a = '66' and bundle_product_b = '58' and bundle_active = '1'

 

[TEP STOP]

 

 

I really don't want to use the normal function and I would like to have this up and working by Friday along with the X sell contribution.

 

Please email me at admin@ipodrepairsquad.com with any help you may have!

 

Many thanks!

 

JS

Share this post


Link to post
Share on other sites

I am attempting to install this module - but I'm having a tough time with the SQL file :blush:

 

I keep getting this error:

#1067 - Invalid default value for 'bundle_product_a'

 

This is the SQL file I have:

 

SQL-Statement Totally new Installation for Version 2-1

ALTER TABLE `products` CHANGE `products_model` `products_model` VARCHAR( 255 );

ALTER TABLE `products_description` CHANGE `products_name` `products_name` VARCHAR( 255 );

ALTER TABLE `orders_products` CHANGE `products_name` `products_name` VARCHAR( 255 );

ALTER TABLE `orders_products` CHANGE `products_model` `products_model` VARCHAR( 255 );

ALTER TABLE products ADD products_bundle_status TINYINT(1) DEFAULT '0' NOT NULL;

INSERT into configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('7212', 'Buy_Two_Module', 'Some settings for how to use the Buy_two_module and if to use.', '7212', '1');

INSERT INTO configuration VALUES ('', 'Use the Buy_Two_Module', 'BUY_TWO_YES_NO', 'yes', 'Do you want to use the buy_two_module at all?', 7212, 1, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'yes\',\'no\'),');

INSERT INTO configuration VALUES ('', 'Want to make use of X-Sell Contrib?', 'XSELLYESNO', 'no', 'Do you want to use the buy_two_module together with the X-Sell Contribution to find dedicated 2.Product to bundle with?', 7212, 2, '2004-08-25 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'yes\',\'no\'),');

INSERT INTO configuration VALUES ('', 'Set the Second-Product-Priority', 'BUY_TWO_PRIORITY', 'no_preference', 'Settings<br><b>1.</b><br>any random Product(catalog)<br><br><b>2.</b><br>Same Manufacturer(catalog)<br><br><b>3.</b><br>Any w/o same Manuf<br><br><b>4.</b><br>Same Manuf Category. If 0 -> extend catalog.<br><br><b>5.</b><br>Any w/o recognizing same Manuf. Same Category. If 0 -> ext to catalog.<br>', 7212, 4, '2004-06-13 00:30:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'no_preference\',\'everyth_manu\',\'everyth_excl_manu\',\'manu_category_catalog\',\'excl_manu_category_catalog\'),');

INSERT INTO configuration VALUES ('', 'Do you want to exclude Products having attributes?', 'BUY_TWO_ATTRIBUTES_YES_NO', 'excluding', 'Do you have attributed products? Want to exclude or include them in the automated and random bundles? IMPORTANT! Attributes can not be choosen in bundles... <br><b>If you have NO products with attributes then we recommend INCLUDING', 7212, 9, '2004-06-14 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'excluding\',\'including\'),');

INSERT INTO configuration VALUES ('', 'Want to use it as discount module or just simple', 'BUY_TWO_DISCOUNT_BUNDLE', 'normal', 'Do you want to use the buy_two_module for creating bundles with a bundle discount or just saying buy these two products at the regular price?', 7212, 10, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'normal\',\'discount\'),');

INSERT INTO configuration VALUES ('', 'Do you want to enable/disable the Products Name Matching Feature?', 'BUY_TWO_PRODUCTS_NAME_MATCHING_YES_NO', 'disable', 'Do you have products you would like to offer as bundle where the second Products name is based on a similar products name? Just enable or disable the feature. If you enable then you also need to enter a number of digits for the matching factor', 7212, 12, '2004-06-16 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'disable\',\'enable\'),');

INSERT INTO configuration VALUES ('', 'Do you want to exclude the product name matching or include?', 'BUY_TWO_PRODUCTS_NAME_MATCHING_IN_EX', 'include', 'Do you want to exclude the product name string in the search result or include it', 7212, 13, '2004-06-16 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'include\',\'exclude\'),');

INSERT INTO configuration VALUES ('', 'Product name matching on first level or all?', 'BUY_TWO_PRODUCTS_LEVEL_MATCHING', 'first', 'If you use the product name matching feature: do you want to use it on first (highest) level or on all levels? I.E. if you first look in categories and then in catalog ALL would mean categories AND cataol. Otherwise only categories.', 7212, 14, '2004-06-16 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'first\',\'all\'),');

INSERT INTO configuration VALUES ('', 'Number of matching charakters in 2nd Product search result', 'BUY_TWO_MATCH_LENGTH', '5', 'How many charakters should match to the result of 2nd Product search?', 7212, 16, '2004-06-16 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'What is your preferred logic to match-search?', 'BUY_TWO_MODE_MATCHING', 'simple', 'You can choose between simple and advanced mode. The difference is the used logic to get the best automatic generated results as possible. Simple just searches for a part of a string, whereby advanced looks for matching charakters which do not have to hang together. Simple mode is faster and advanced takes a tick longer', 7212, 17, '2004-06-16 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'simple\',\'advanced\'),');

INSERT INTO configuration VALUES ('', 'Choose the part of the source product name?', 'BUY_TWO_PART_MATCHING', 'left', 'Which part of the 1st Product should be taken? Choose between left, middle and right', 7212, 18, '2004-06-16 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'left\',\'middle\',\'right\'),');

INSERT INTO configuration VALUES ('', 'image width', 'BUY_TWO_IMAGE_WIDTH', '40', 'Set the image width you want to use on the product info page we recommend smaller than the normal image', 7212, 20, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'image height', 'BUY_TWO_IMAGE_HEIGHT', '40', 'Set the image height you want to use on the product info page we recommend smaller than the normal image', 7212, 25, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'If Bundle with discount: bundle titel in product name', 'BUY_TWO_BUNDLE_NAMING', 'Bundle', 'If you use the bundling with discount feature then how do you want to title your bundling', 7212, 30, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'If Bundle with discount: -FROM- bundle word', 'BUY_TWO_TEXT_FROM_BUNDLE', 'from', 'If you use the bundling with discount feature then how do you want the word to be saying product a from bundle?', 7212, 33, '2004-09-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'If Bundle with discount: discount for Product A in % = ', 'BUY_TWO_BUNDLE_DISCOUNT_RATE_A', '5', 'If you use the bundling with discount feature then how does the discount rate in % for PRODUCT A look like?<br>If you do not want to discount A then set 0', 7212, 40, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, NULL);
INSERT INTO configuration VALUES ('', 'If Bundle with discount: discount for Product B in % = ', 'BUY_TWO_BUNDLE_DISCOUNT_RATE_B', '5', 'If you use the bundling with discount feature then how does the discount rate in % for PRODUCT B look like?<br>If you do not want to discount B then set 0', 7212, 41, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Use automatically generated images or a default one?', 'BUY_TWO_AUTO_IMAGE', 'automatically', 'Do you want to use the automatically generated images or better a default one? if default you have to enter the bundle image name.', 7212, 48, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'automatically\',\'manually\'),');

INSERT INTO configuration VALUES ('', 'Enter the Bundle image you want to use', 'BUY_TWO_BUNDLE_IMAGE', 'bundle_image.gif', 'Please enter the image you want to use as default bundle image. Default here is bundle_image.gif and it is found in the catalog/images directory', 7212, 50, '2004-06-10 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Quantity of the Bundle (max. available)', 'BUY_TWO_BUNDLE_QUANTITY', '999', 'Please enter the quantity you want to offer at max. after it is simply sold out as other products. Maybe it could happen that a customer wants not only a bundle one time but more, because it attracts him...', 7212, 45, '2004-06-10 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Set the delete flag', 'BUY_TWO_DELETE_FLAG', 'off', 'If set to 0: expired items will still hold in the database products, product description, specials and buy_two_bundles. Set to 1: will delete all tables except the buy_two_bundles. This is only delete in combination with archive = 0', 7212, 79, '2004-06-10 10:00:00', '0000-00-00 00:00:00',  NULL, 'tep_cfg_select_option(array(\'off\',\'on\'),');

INSERT INTO configuration VALUES ('', 'Set the archive flag', 'BUY_TWO_ARCHIVE_FLAG', 'on', 'If set to 0: expired items will still hold in the database products, product description, specials and buy_two_bundles. Set to 1: will delete all tables except the buy_two_bundles. This is only delete in combination with archive = 0', 7212, 78, '2004-06-10 10:00:00', '0000-00-00 00:00:00',  NULL, 'tep_cfg_select_option(array(\'on\',\'off\'),');

INSERT INTO configuration VALUES ('', 'Number of days of holding a bundle until it expires', 'BUY_TWO_BUNDLE_DAYS', '2', 'Enter the number of days you want to keep the product as active in the database. at least you should keep it one day', 7212, 80, '2004-06-10 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Expired Bundle: what should we do if customer has one remaining in the cart?', 'BUY_TWO_CART_ACTION', 'nothing', 'You may want to choose what the system should do. Nothing is clear: it will remain as is. Kill bundle means just to take it out of the cart. Re-Bundle is to exchange with the normal items at normal pricing', 7212, 90, '2004-06-10 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'nothing\',\'kill\',\'RE-bundle\'),');

INSERT INTO configuration VALUES ('', 'If Bundle with discount: bundle titel in model name', 'BUY_TWO_BUNDLE_MODEL_NAMING', 'Bdl', 'If you use the bundling with discount feature then how do you want to title your bundling in the model title', 7212, 35, '2004-06-09 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Do you have big images? also as column within the products table?', 'BUY_TWO_BIG_IMAGE', 'no', 'If you are using an own image for small and a seperated one for large then set to yes. If not then no.', 7212, 52, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'no\',\'yes\'),');

INSERT INTO configuration VALUES ('', 'Automatic Image Size accelerator: default is 1', 'BUY_TWO_BUNDLE_SML_SIZE', '1', 'What is the accelerator for small images if you use BIG images, too. Otherwise this is the accelarator JUST for your one picture. Normally we set the size of new image to the max width and max heigth of biggest image', 7212, 53, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Automatic Image Size accelerator for BIG images: default is 1', 'BUY_TWO_BUNDLE_BIG_SIZE', '1', 'What is the accelerator for BIG images? Only works if you use BIG images. Normally we set the size of new image to the max width and max heigth of biggest image', 7212, 54, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Picture in Picture: Image 1 accelerator WIDTH: default is 1', 'BUY_TWO_BUNDLE_IMGINN_A_W', '1', 'What is the accelerator for Picture 1 within the Picture images?', 7212, 56, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Picture in Picture: Image 1 accelerator HEIGTH: default is 1', 'BUY_TWO_BUNDLE_IMGINN_A_H', '1', 'What is the accelerator for Picture 1 within the Picture images?', 7212, 57, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Picture in Picture: Image 2 accelerator WIDTH: default is 1', 'BUY_TWO_BUNDLE_IMGINN_B_W', '1', 'What is the accelerator for Picture 1 within the Picture images?', 7212, 58, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Picture in Picture: Image 2 accelerator HEIGTH: default is 1', 'BUY_TWO_BUNDLE_IMGINN_B_H', '1', 'What is the accelerator for Picture 1 within the Picture images?', 7212, 59, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Do you want to delete images automatically when bundle expired?', 'BUY_TWO_DEL_IMAGE', 'yes', 'Do you want to delete images automatically when bundle expired? Standard is yes!', 7212, 77, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'yes\',\'no\'),');


INSERT INTO configuration VALUES ('', 'Picture in Picture: Image 1 size of border: default is 4', 'BUY_TWO_IMAGE_A_BORDER', '4', 'What is the size of the border for Picture 1 within the Picture images?', 7212, 61, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Picture in Picture: Image 2 size of border: default is 4', 'BUY_TWO_IMAGE_B_BORDER', '4', 'What is the size of the border for Picture 2 within the Picture images?', 7212, 62, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Background color of NEW IMAGE -> RED', 'BUY_TWO_BG_R', '255', 'Background color of NEW IMAGE -> the red value 0-255', 7212, 63, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Background color of NEW IMAGE -> GREEN', 'BUY_TWO_BG_G', '255', 'Background color of NEW IMAGE -> the green value 0-255', 7212, 64, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Background color of NEW IMAGE -> BLUE', 'BUY_TWO_BG_B', '255', 'Background color of NEW IMAGE -> the blue value 0-255', 7212, 65, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Border color of NEW IMAGE Picture 1 -> RED', 'BUY_TWO_BCOLA_R', '255', 'Border color of NEW IMAGE Picture 1 -> the red value 0-255', 7212, 66, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Border color of NEW IMAGE Picture 1 -> GREEN', 'BUY_TWO_BCOLA_G', '255', 'Border color of NEW IMAGE Picture 1 -> the green value 0-255', 7212, 67, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Border color of NEW IMAGE Picture 1 -> BLUE', 'BUY_TWO_BCOLA_B', '255', 'Border color of NEW IMAGE Picture 1 -> the blue value 0-255', 7212, 68, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Border color of NEW IMAGE Picture 2 -> RED', 'BUY_TWO_BCOLB_R', '255', 'Border color of NEW IMAGE Picture 2 -> the red value 0-255', 7212, 69, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Border color of NEW IMAGE Picture 2 -> GREEN', 'BUY_TWO_BCOLB_G', '255', 'Border color of NEW IMAGE Picture 2 -> the green value 0-255', 7212, 70, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Border color of NEW IMAGE Picture 2 -> BLUE', 'BUY_TWO_BCOLB_B', '255', 'Border color of NEW IMAGE Picture 2 -> the blue value 0-255', 7212, 71, '2004-06-12 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Set on the table cleaning mode', 'BUY_TWO_CLEANING_MODE_ON_OFF', 'off', 'Do you want the cleaning of tables set on or off- if set to on it will be on all the time, if set to off the cleaning mode will run in the night by scheduler.', 7212, 980, '2004-06-19 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'off\',\'on\'),');

INSERT INTO configuration VALUES ('', 'FORCE cleaning now !!!! NOT FOR NORMAL OPERATION !!!!', 'BUY_TWO_FORCE_CLEAN_ON_OFF', 'off', 'Do you want to force the cleaning of the tables? Set only to on if you e.g. installed an relevant update to empty the tables and prevent mistakes', 7212, 990, '2004-06-19 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'off\',\'on\'),');

INSERT INTO configuration VALUES ('', 'Treat these 2nd bundle product from these categories in a special way:', 'BUY_TWO_EX_CAT', '', 'Sometimes it is better not to bundle a product with a specific product from a specific categorie. Or also to force the bundle with a specific caegory. Enter comma separated categories_ids like 1,2,3,4,5 - IMPORTANT: leave the field empty to DEACTIVATE the function.', 7212, 8, '2004-06-20 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

INSERT INTO configuration VALUES ('', 'Do you want to exclude categories or include them?', 'BUY_TWO_EX_CAT_EX_IN', 'include', 'Sometimes you want to prevent the 2nd product to be choosen from a specific category and sometimes you want to include them.', 7212, 7, '2004-06-19 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'include\',\'exclude\'),');

INSERT INTO configuration VALUES ('', '<b>FIRST Product:</b> include or exclude categories?', 'BUY_TWO_PRODUCT_A_CAT_EX_IN', 'include', 'Sometimes you want to prevent to choose a bundle if  1st product is within a specific category and sometimes you want to include them.', 7212, 5, '2004-08-27 10:00:00', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(\'include\',\'exclude\'),');

INSERT INTO configuration VALUES ('', '<b>FIRST Product:</b> These are the categories to include or exclude', 'BUY_TWO_PRODUCT_A_EX_CAT', '', 'Which are the categories you want to include or exclude? Enter comma separated categories_ids like 1,2,3,4,5 - IMPORTANT: leave the field empty to DEACTIVATE the function.', 7212, 6, '2004-08-27 10:00:00', '0000-00-00 00:00:00', NULL, NULL);

DROP TABLE IF EXISTS buy_two_bundles;
CREATE TABLE buy_two_bundles (
 products_id INT(11) NOT NULL AUTO_INCREMENT,
 bundle_product_a INT(11) NOT NULL DEFAULT '',
 bundle_product_b INT(11) NOT NULL DEFAULT '',
 bundle_date_added datetime NOT NULL default '0000-00-00 00:00:00',
 bundle_date_expire datetime NOT NULL default '0000-00-00 00:00:00',
 bundle_delflag TINYINT(1) NOT NULL DEFAULT '0',
 bundle_active TINYINT(1) NOT NULL DEFAULT '1',
 bundle_archive TINYINT(1) NOT NULL DEFAULT '1',
 bundle_cart TINYINT(1) NOT NULL DEFAULT '0',
 bundle_normal_price DECIMAL(15,4) NOT NULL DEFAULT '0',
 bundle_price DECIMAL(15,4) NOT NULL DEFAULT '0',
 bundle_discount_a DECIMAL(5,2) NOT NULL DEFAULT '0',
 bundle_discount_b DECIMAL(5,2) NOT NULL DEFAULT '0',
 bundle_products_model VARCHAR(255) NOT NULL DEFAULT '',
 bundle_products_name VARCHAR(255) NOT NULL DEFAULT '',
 bundle_products_click_count INT(11) NOT NULL DEFAULT '',
 PRIMARY KEY  (products_id)
) TYPE=MyISAM;

 

I'm not sure what to do to fix this. Is it because it shows it as NOT NULL but the DEFAULT is blank? Can I put a 0 in the '' after DEFAULT or will that mess things up?

 

Thanks in advance!


~Tracy
 

Share this post


Link to post
Share on other sites
I am attempting to install this module - but I'm having a tough time with the SQL file :blush:

 

I keep getting this error:

#1067 - Invalid default value for 'bundle_product_a'

 

I'm not sure what to do to fix this. Is it because it shows it as NOT NULL but the DEFAULT is blank? Can I put a 0 in the '' after DEFAULT or will that mess things up?

 

Thanks in advance!

 

Well, I added 0 in between the '' for all DEFAULT values that say NOT NULL and didn't have anything in the '' and it at least succesfully updated my database - hopefully this won't change how the contrib works though :huh:


~Tracy
 

Share this post


Link to post
Share on other sites

Where do I set what products I want bundled together? I don't want it to just take a random product and bundle it with the product I'm looking at. I have specific products I want bundled with other specific products and those are the only bundles I want to offer :huh:


~Tracy
 

Share this post


Link to post
Share on other sites
Where do I set what products I want bundled together? I don't want it to just take a random product and bundle it with the product I'm looking at. I have specific products I want bundled with other specific products and those are the only bundles I want to offer :huh:

 

Did you ever get an answer to this? I can't figure out how to specify bundles either.


Sterling (a.k.a. DailyLunatic)

Useful Threads: Basics for Design.

Useful URL's: Knowledge Base, SQL Tutorial,

My Setup: Master Products v1.2, Need help installing Bundled Products v1.4.

Share this post


Link to post
Share on other sites

Hi There,

after using extensively the contribution i found that it slows really a lot the site...anyone willing to optimize it? I can test and help too!

Tia

Freeman


Advice on forum are Free, Email or Pm to fix your site is work...which I charge for :)

-------------------

Share this post


Link to post
Share on other sites

I tried to install that contribution, but it don't works with me :'(

I copy paste the code above to catalog/product_info.php and upload it, just after that when I click on an article in hte store I saw that the right table disapears and I have that error at the bottom of the page«above the buttons Reviews and Add to cart

Fatal error: Call to undefined function: tep_first_product_check() in /home/isqxxzf/public_html/catalog/product_info.php on line 248

// BOF: This is the buy_two_module and if there is a wording in the beginning of the produkt model text then
// this will not appear because it makes no sense to bundle a bundle and so on...
if (BUY_TWO_YES_NO == 'yes') {

if (ereg('^'.BUY_TWO_BUNDLE_MODEL_NAMING.'_', $product_info['products_model'])) {
//        echo 'TEST this is a bundle';
      } else {

	if (tep_first_product_check($product_info['products_id'])) include(DIR_WS_MODULES . 'buy_two_module.php');

      }
} else {
}
// buy_two_module EOF

 

I need help, Please!

Share this post


Link to post
Share on other sites

Hi,

I installed the contribution. No errors, no blank pages, .... I can see the Buy two module in my config settings in my admin, but I see nothing in my store.

 

Anyone out there can help me?

Share this post


Link to post
Share on other sites

THis contribution works great, but, when I clik in one of the products from the special offer it opens a pop up with an image of the article.

How can I change the link for that it could open the page of the article?

Share this post


Link to post
Share on other sites

I solved the previous problems, but for that one I can't find a solution. Help needed, please........

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  

×