Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

manufacturer2 2.0


andes1

Recommended Posts

I just uploaded.

 

Really this contribution had been really buggy… and incomplete… I’ll try to make this contribution works, after that, I going to upload it to test on vanilla installation (this is the current step)… and to check for bugs… next I will make the long, long… install instructions manual.

Any help will be welcome due to my lack of time. :blush: :rolleyes:

 

The concept is simple; you should to consider that Manufacturers is a module or contribution, from here, the idea is to make a twin contribution; that’s it.

 

You can use this twin for multiple purposes:

Prices and range of prices, gifs for him or her, buy for occasion (anniversary, new child born), buy by authors, buy clothes for summer winter etc.

 

For now only run the sql command on your database, and upload to your site the files and folders provided… if you have a modified store use wincompare.

 

For your particular needs, you can change the literature on languages files.

 

And remember backup, backup, backup.

besos

 

dont forget:

run the sql command or file attached, on your phpmyadmin (nice feature on your host)

Link to comment
Share on other sites

  • Replies 97
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

i couldnt really understand even with the explanation what is the purpose of this contrib

 

could you give screenshot or a concrete exemple ? :'(

 

 

hello

 

For example: if you have a flower shop... you want to sell your product for occasion (anniversary, love, congratulations etc) also you want to sell your product by price in addition to categories (roses, gerberas, sunflowers etc).

 

Another example; on a hypothetic perfumes and aromas store.

 

 

Categories:

Bath

Night perfume

Day perfume

Teens

Kids

Lotions

Body lotions

Accessories etc

 

MANUFACTURERS:

Carolina Herrera

DOLCE GAVANA

VERSACHE

NAUTICA

 

 

FOR HIM OR HER: ...... ( MANUFACTURERS2; you can change the literature on languages files)

For Him

For Her

 

ALSO IF YOUR PRODUCT IS MAKEN FOR 2 manufacturers; eje; pc Dell 3000 with Intel processor.so the costumer can select products Dell or products Intel.

 

Well.... I had described only a few examples. You can use it to fit your particular needs.

:thumbsup:

Link to comment
Share on other sites

now i understand , and in fact whereas calling it manufacturer 2 i could say we could call it "new group possiblity"

 

I think i would like to use it for fashion clothes shop where you got to define summer / winter season for each year then people would be able to select the right season :-)

 

i think of somethink that would be interesting : having the name of "manufacturer" multilanguage with a description;

it has been done for manufacturer at : http://www.oscommerce.com/community/contri...ch,manufacturer

 

maybe you could look at it and then make an update to manufacturers 2 :blush:

 

i d love to help

MS2

Link to comment
Share on other sites

i think there is a bug on the sql ::

 

CREATE TABLE `manufacturers2_info` (
 `manufacturers2_id` int(11) NOT NULL default '0',
 `languages_id` int(11) NOT NULL default '0',
 `manufacturers2_url` varchar(255) NOT NULL default '',
 `url_clicked` int(5) NOT NULL default '0',
 `date_last_click` datetime default NULL,
 PRIMARY KEY  (`[b]manufacturers_id[/b]`,`languages_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

manufacturers_id should be : manufacturers2_id

 

 

by the way impossible to have the box working :

here is the error i got :

 

Undefined variable: manufacturers2_name

At \ms2fr\shop\includes\boxes_content\manufacturers2.php:31

 

i checked the database declaration and all is ok , any clue ?

MS2

Link to comment
Share on other sites

i think there is a bug on the sql ::

 

CREATE TABLE `manufacturers2_info` (
 `manufacturers2_id` int(11) NOT NULL default '0',
 `languages_id` int(11) NOT NULL default '0',
 `manufacturers2_url` varchar(255) NOT NULL default '',
 `url_clicked` int(5) NOT NULL default '0',
 `date_last_click` datetime default NULL,
 PRIMARY KEY  (`[b]manufacturers_id[/b]`,`languages_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

manufacturers_id should be : manufacturers2_id

by the way impossible to have the box working :

here is the error i got :

i checked the database declaration and all is ok , any clue ?

 

Thanks, i'm going to check that this weekend.

Link to comment
Share on other sites

by the way...

you said "manufacturers_id should be : manufacturers2_id"

 

on the sql you will find it

 

CREATE TABLE `manufacturers2_info` (

`manufacturers2_id` int(11) NOT NULL default '0',

`languages_id` int(11) NOT NULL default '0',

`manufacturers2_url` varchar(255) NOT NULL default '',

`url_clicked` int(5) NOT NULL default '0',

`date_last_click` datetime default NULL,

PRIMARY KEY (`manufacturers_id`,`languages_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

 

"Undefined variable: manufacturers2_name

At \ms2fr\shop\includes\boxes_content\manufacturers2.php:31"

 

which file? are trying to do what?

 

thanks :thumbsup:

Link to comment
Share on other sites

1.im trying to install it on index.php and without a proper install it s hard to know where and what to change ... i hope you make one very soon !

 

2.

PRIMARY KEY (`manufacturers_id`,`languages_id`)

is the part with an error i think it should be :

PRIMARY KEY (`manufacturers2_id`,`languages_id`)

<- notice the number 2

 

3.

"Undefined variable: manufacturers2_name
At \ms2fr\shop\includes\boxes_content\manufacturers2.php:31"

 

it s on the boxe in the catalog side that i get this error !

 

4. the change on the index, what do i have to select in my catalog to see the new manufacturers 2 dropdown menu to make a selection ?

i tried on all products, on a sub categories , didnt find the right case to see apears the dropdown

 

i can see the triger is :

 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers2_id'])) {

MS2

Link to comment
Share on other sites

HELLO

HERE some posible answers:

 

1.I know, is difficult but... Ok for a while only run the sql, and upload the files provided. Do it on a vanilla store. Soon when we don’t have known bugs, I’m going to write the LONG install.

 

2.The SQL command have the manufacturers2_id, please check it again.

 

3.Try to add some manufacturers (eje: versache)on your MANUFACTURERS2 on your admin side. Did you upload catalog/includes/colum_left.php?

 

4.Same as above.

 

thanks :thumbsup:

Link to comment
Share on other sites

2.The SQL command have the manufacturers2_id, please check it again.

 

PLEASE read and see that the pirmary key field is wrong manufacturers_id doesnt exist in the created table field :

 

CREATE TABLE `manufacturers2_info` (
 `manufacturers2_id` int(11) NOT NULL default '0',
 `languages_id` int(11) NOT NULL default '0',
 `manufacturers2_url` varchar(255) NOT NULL default '',
 `url_clicked` int(5) NOT NULL default '0',
 `date_last_click` datetime default NULL,
 PRIMARY KEY  (`manufacturers_id`,`languages_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

3.Try to add some manufacturers (eje: versache)on your MANUFACTURERS2 on your admin side. Did you upload catalog/includes/colum_left.php?

yes it s inlcudes in column left

 

4. i wrote index.php not the box on the side

 

Same as above.

the change on the index, what do i have to select in my catalog to see the new manufacturers 2 dropdown menu to make a selection ?

i tried on all products, on a sub categories , didnt find the right case to see apears the dropdown

 

i can see the triger is :

 

} elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers2_id'])) {

MS2

Link to comment
Share on other sites

Hi

this is the sql command. run it on a fresh vanilla store or before run it simply erase manufacturers2 , manufacturers2_info tables and the field manufacturers2_id on products table. and run it

 

CREATE TABLE `manufacturers2` (
 `manufacturers2_id` int(11) NOT NULL auto_increment,
 `manufacturers2_name` varchar(32) NOT NULL default '',
 `manufacturers2_image` varchar(64) default NULL,
 `date_added` datetime default NULL,
 `last_modified` datetime default NULL,
 PRIMARY KEY  (`manufacturers2_id`),
 KEY `IDX_MANUFACTURERS2_NAME` (`manufacturers2_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;

CREATE TABLE `manufacturers2_info` (
 `manufacturers2_id` int(11) NOT NULL default '0',
 `languages_id` int(11) NOT NULL default '0',
 `manufacturers2_url` varchar(255) NOT NULL default '',
 `url_clicked` int(5) NOT NULL default '0',
 `date_last_click` datetime default NULL,
 PRIMARY KEY  (`manufacturers2_id`,`languages_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

ALTER TABLE `products` ADD `manufacturers2_id` int(11) default NULL

after that I upload again the files and everything seems to work fine.

 

LET ME KNOW :rolleyes:

 

THANKS

Link to comment
Share on other sites

well as i can see you made the change for the primary key so it should be working

im happy you found out what was the error for the database

 

im impatient to see evolve this contribution with you :lol:

 

i thin if you want people to help we need to have a proper install text file

then we will have more people to give feedback

MS2

Link to comment
Share on other sites

HI

just now i have time to work again on the contribution,

i'm trying the contribution that you recommend to me

http://www.oscommerce.com/community/contri...ch,manufacturer%20%20

" target="_blank">

http://www.oscommerce.com/community/contri...ch,manufacturer

in order to merge, but something is going wrong.

 

I wonder if you have tried before, if so what is the correct sql command.

i have this one from the contributtion

ALTER TABLE `manufacturers_info` ADD `manufacturers_name` VARCHAR( 32 ) NOT NULL AFTER `languages_id` ;
ALTER TABLE `manufacturers_info` ADD `manufacturers_description` TEXT NOT NULL AFTER `manufacturers_name` ;
update `manufacturers` m, `manufacturers_info` i set i.`manufacturers_name`=m.`manufacturers_name` where m.`manufacturers_id`= i.`manufacturers_id`
ALTER TABLE `manufacturers` DROP `manufacturers_name`;

but it shows error

UPDATE `manufacturers` m,

`manufacturers_info` i SET i.`manufacturers_name` = m.`manufacturers_name` WHERE m.`manufacturers_id` = i.`manufacturers_id`

 

MySQL said: Documentación

#1054 - Unknown column 'm.manufacturers_name' in 'field list'

 

if you have the correct one we can save time.... :rolleyes:

 

thanks

Link to comment
Share on other sites

thanks for the contribution it all seems to have installed fine. However, im looking to create a dropdown list for all the manufacturers2 like I have in my header for normal manufacturers. I dont know much about php and thought copying and pasting the code I already had that works for normal manufacturers and then renaming all 'manufacturers' to manufacturers2' would work. Although, it doesnt seem to.

 

Could you take a look at my site here: www.topgoth.co.uk

 

You will see in the header I have one dropdown list for normal manufacturers and im trying to create one for manufactuers2. How can i do this?

 

Heres the current code I am trying to use to try and get manufacturers2 into a dropdown list:

 

<?   // ---- MANUFACTURERS2


 $manufacturers2_query = tep_db_query("select manufacturers2_id, manufacturers2_name from " . TABLE_MANUFACTURERS2 . " order by manufacturers2_name");
 if ($number_of_rows = tep_db_num_rows($manufacturers2_query)) {


;	  
  echo 

 tep_draw_form('manufacturers2', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')



	;	

  $manufacturers2_array = array();
  while ($manufacturers2 = tep_db_fetch_array($manufacturers2_query)) {
	$manufacturers2_name = ((strlen($manufacturers2['manufacturers2_name']) > MAX_DISPLAY_MANUFACTURER2_NAME_LEN) ? substr($manufacturers2['manufacturers2_name'], 0, MAX_DISPLAY_MANUFACTURER2_NAME_LEN) . '..' : $manufacturers2['manufacturers2_name']);
	$manufacturers2_array[] = array('id' => $manufacturers2['manufacturers2_id'],
								   'text' => $manufacturers2_name);
  }

  echo tep_draw_pull_down_menu('manufacturers2_id', $manufacturers2_array, (isset($HTTP_GET_VARS['manufacturers2_id']) ? $HTTP_GET_VARS['manufacturers2_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=go') . tep_hide_session_id();
  echo ' <input type=image src=includes/languages/english/images/buttons/small_view.gif></td>


		  </form>

	   ';

 }

?>

 

 

and heres the original code that is working fine for normal manufacturers:

 

<?   // ---- MANUFACTURERS


 $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
 if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {


;	  
  echo 

 tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')



	;	

  $manufacturers_array = array();
  while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
	$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
	$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
								   'text' => $manufacturers_name);
  }

  echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=go') . tep_hide_session_id();
  echo ' <input type=image src=includes/languages/english/images/buttons/small_view.gif></td>


		  </form>

	   ';

 }

?>

 

 

what should I change?

 

thanks,

 

Ben

Edited by Benjjj6
Link to comment
Share on other sites

i got a strange issue , when i add a manufacturer then after if i do edit i got the url of the table manufacturer that show , i double checked all my code i always call manufacturer2

have you guys have the same issue ?

MS2

Link to comment
Share on other sites

Ive realised that the dropdown list DOES WORK for manufactuers 2 it just doesnt show the names of the manufacturers in the list, any idea why this could be?

 

its ok ive fixed this now, I replaced MAX_DISPLAY_MANUFACTURER2_NAME_LEN with MAX_DISPLAY_MANUFACTURER_NAME_LEN

Link to comment
Share on other sites

solution to a small bug

 

Hello, I'd like to add a list like manufacturers list and I tried "manufacturers 2" contribution.

 

But I have a problem...

 

I could add new category(ex. country).

When I select one contry from the country list, it shows the result but titles are not appropriate.

 

I mean items are shown but the header shows 'What's New Here?' and 'TABLE_HEADING_IMAGE TABLE_HEADING_PRODUCTS+ TABLE_HEADING_PRICE TABLE_HEADING... ' '

 

on includes/languages/english/index.php and

includes/languages/whatever language/index.php and make the aproppiate changes according to the language

 

add before last ?>

 

// manufacturers 2
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers2_id'])) ) {
 define('HEADING_TITLE', 'Let\'s See What We Have Here');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'What\'s New Here?');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
// end manufacturers 2 otro

 

 

that's it

 

thanks

 

Finally, tomorrow if god wants; i'm going to write the install instructions.

Link to comment
Share on other sites

i got a strange issue , when i add a manufacturer then after if i do edit i got the url of the table manufacturer that show , i double checked all my code i always call manufacturer2

have you guys have the same issue ?

 

Hi

sorry for the delay ...

 

i don't understand, can you explain it to us a little bit more

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...