Jump to content
Sign in to follow this  
wheeloftime

[Contrib] Make An Offer

Recommended Posts

Make An Offer v2.1

 

Just uploaded.

- The customer has the option to send a confirmation to his own email address yes or no

- Through the Admin configuration you can set a maximum discount percentage related to the original price for which you will accept an offer (to prevent ridiculous offers)

- The status to show or not show the 'Make An Offer' button can now also be set without the need to edit a product (through the same method as you can enable/disable a product)

- In the Admin it is visible for each product if it is on Special or not. This to prevent possible mistakes when activating the 'Make An Offer' button while the product is also on Special (except of course if you really want this).

 

- Bugfix:

After an error on the email address all product information was lost

which lead to an empty email regarding the product information

 

Next step:

Admin interface to handle the offers.

Share this post


Link to post
Share on other sites

Okay dokie...

 

I finally installed the latest version and everything works except for the Maximum Percentage thingy.

 

I have it set in Admin at 10

 

I go to http://www.popthetop.com/catalog/product_i...products_id=259 and make an offer for $1.95 on a product that is marked at $14.95 and has a special proce of $12.95

 

It submits it with no error message on being too low.

 

Same thing happens when items are not on special too.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Okay dokie...

 

I finally installed the latest version and everything works except for the Maximum Percentage thingy.

 

I have it set in Admin at 10

 

I go to http://www.popthetop.com/catalog/product_i...products_id=259 and make an offer for $1.95 on a product that is marked at $14.95 and has a special proce of $12.95

 

It submits it with no error message on being too low.

 

Same thing happens when items are not on special too.

 

 

This is my SQL exported to show you...

 

TABLE_CONFIGURATION - VALUES (
1181, 
'Maximum Allowed <i>Make an Offer</i> Discount', 
'MAO_MAX_OFFER_PERCENTAGE_ALLOWED', 
'10', 
'The maximum discount percentage related to the official price for which you will still accept an offer (ie. if the set price is $100, all offers below 80 will not be accepted with a 20% maximum.).', 
3, 
26, 
'2005-04-10 13:23:06', 
'2005-04-10 13:16:19', 
NULL, 
NULL);

 

 

TABLE_CONFIGURATION_GROUP - VALUES (
26, 
'Make An Offer', 
'The options to configure the <i>Make An Offer</i> button<br><br>', 
24, 
1);

 

 

TABLE_PRODUCTS - (
 `products_id` int(11) NOT NULL auto_increment,
 `products_quantity` int(4) NOT NULL default '0',
 `products_model` varchar(15) default NULL,
 `products_image` varchar(64) default NULL,
 `products_bimage` varchar(64) default NULL,
 `products_price` decimal(15,4) NOT NULL default '0.0000',
 `products_retail_price` decimal(10,2) default NULL,
 `products_cost` decimal(10,2) default NULL,
 `products_date_added` datetime NOT NULL default '0000-00-00 00:00:00',
 `products_last_modified` datetime default NULL,
 `products_date_available` datetime default NULL,
 `products_weight` decimal(5,2) NOT NULL default '0.00',
 `products_status` tinyint(1) NOT NULL default '0',
 `products_tax_class_id` int(11) NOT NULL default '0',
 `manufacturers_id` int(11) default NULL,
 `products_ordered` int(11) NOT NULL default '0',
 `products_ship_price` decimal(15,4) NOT NULL default '0.0000',
 `products_ship_price_two` decimal(15,4) NOT NULL default '0.0000',
 `products_free_shipping` tinyint(1) NOT NULL default '0',
 `products_make_an_offer` tinyint(1) NOT NULL default '0',
 PRIMARY KEY  (`products_id`),
 KEY `idx_products_date_added` (`products_date_added`)
) TYPE=MyISAM AUTO_INCREMENT=327;

 

 

The only thing that I did not do and I do not think that it has anything to do with this, but I did not add:

UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
This is my SQL exported to show you...

 

TABLE_CONFIGURATION - VALUES (
1181, 
'Maximum Allowed <i>Make an Offer</i> Discount', 
'MAO_MAX_OFFER_PERCENTAGE_ALLOWED', 
'10', 
'The maximum discount percentage related to the official price for which you will still accept an offer (ie. if the set price is $100, all offers below 80 will not be accepted with a 20% maximum.).', 
3, 
26, 
'2005-04-10 13:23:06', 
'2005-04-10 13:16:19', 
NULL, 
NULL);

TABLE_CONFIGURATION_GROUP - VALUES (
26, 
'Make An Offer', 
'The options to configure the <i>Make An Offer</i> button<br><br>', 
24, 
1);

TABLE_PRODUCTS - (
?`products_id` int(11) NOT NULL auto_increment,
?`products_quantity` int(4) NOT NULL default '0',
?`products_model` varchar(15) default NULL,
?`products_image` varchar(64) default NULL,
?`products_bimage` varchar(64) default NULL,
?`products_price` decimal(15,4) NOT NULL default '0.0000',
?`products_retail_price` decimal(10,2) default NULL,
?`products_cost` decimal(10,2) default NULL,
?`products_date_added` datetime NOT NULL default '0000-00-00 00:00:00',
?`products_last_modified` datetime default NULL,
?`products_date_available` datetime default NULL,
?`products_weight` decimal(5,2) NOT NULL default '0.00',
?`products_status` tinyint(1) NOT NULL default '0',
?`products_tax_class_id` int(11) NOT NULL default '0',
?`manufacturers_id` int(11) default NULL,
?`products_ordered` int(11) NOT NULL default '0',
?`products_ship_price` decimal(15,4) NOT NULL default '0.0000',
?`products_ship_price_two` decimal(15,4) NOT NULL default '0.0000',
?`products_free_shipping` tinyint(1) NOT NULL default '0',
?`products_make_an_offer` tinyint(1) NOT NULL default '0',
?PRIMARY KEY ?(`products_id`),
?KEY `idx_products_date_added` (`products_date_added`)
) TYPE=MyISAM AUTO_INCREMENT=327;

The only thing that I did not do and I do not think that it has anything to do with this, but I did not add:

UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();

 

I had no problems with it but I'll look into it tomorrow and see if I can find anything why it won't work for you !

 

Laterz

Share this post


Link to post
Share on other sites

Ok, here is an update...

(This includes the latest file that was sent to me by wheeloftime)

 

Everything works except for the Maximum Percentage setting.

I have it set in Admin at 10

 

I make an offer for $1.95 on a product that is marked at $14.95 and has a special price of $12.95

 

It submits it with no error message on being too low.

Same thing happens when items are not on special too.

 

...still


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Ok, here is an update...

(This includes the latest file that was sent to me by wheeloftime)

 

Everything works except for the Maximum Percentage setting.

I have it set in Admin at 10

 

I make an offer for $1.95 on a product that is marked at $14.95 and has a special price of $12.95

 

It submits it with no error message on being too low.

Same thing happens when items are not on special too.

 

...still

 

If you adept it to your own needs do it right...it works alright.

Share this post


Link to post
Share on other sites

What do you mean by do it right?

 

The e-mails were stripping the < and > off the tags on the specials price so I made a new $products_price_email = xxx for the e-mails.

 

$products_price_email = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '\n' . 'Sale Price: ' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));

 

 

What do you mean by it works alright?

 

Everything works except for the Maximum Percentage setting.

I have it set in Admin at 10

 

I make an offer for $1.95 on a product that is marked at $14.95 and has a special price of $12.95

 

It submits it with no error message on being too low.

Same thing happens when items are not on special too.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
What do you mean by do it right?

 

The e-mails were stripping the < and > off the tags on the specials price so I made a new $products_price_email = xxx for the e-mails.

 

$products_price_email = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '\n' . 'Sale Price: ' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));

What do you mean by it works alright?

 

Everything works except for the Maximum Percentage setting.

I have it set in Admin at 10

 

I make an offer for $1.95 on a product that is marked at $14.95 and has a special price of $12.95

 

It submits it with no error message on being too low.

Same thing happens when items are not on special too.

 

With the updated beta code I sent you in confidence (not to blabber about it on the board) I miss for one thing the hidden field 'originalprice'. Also I changed the length of the newprice field which isn't in your source. There's no problem if you only take the things out of the source I gave you to put in your own version but appearantly you went wrong on a couple of places.

I checked the revised code yesterday especially for the US notation and just did a couple of more checks to see what I already knew, it works with the Maximum percentage as it should now.

Share this post


Link to post
Share on other sites

Make An Offer v2.2

 

Urgent update if you have one of the previous versions installed !!

There was a serious error with the calculation of the maximum allowed offer when there was a valuta sign in front of the price (it just didn't work as PopTheTop pointed out).

Otherwise just some cosmetic changes plus an extra define to have a personal quote within the email send to the customer.

Share this post


Link to post
Share on other sites

This works like a charm!


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

I just installed Make an Offer 2.2.

 

I followed all the instructions and when I go to the admin - configuration - Make An Offer, I basically get a blank page:

 

It has the title "Make An Offer" and a header bar:

 

"Title Value Action"

 

 

Any tips on how I can troubleshoot what code is having problems?

 

I checked the HTTP errorlog and no errors are being reported.

 

Thank You,

Kevin

Share this post


Link to post
Share on other sites

No problem, it has not been added yet. He is still working on finishing the Admin side of it as the installtion readme file states.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Hey Howard, I have been working a little on the Admin side of things. I got it to list all the products that currently have Make an Offer enabled on the screen at Admin / Configuration / Make an Offer AND I moved the Admin / Configuration / Make an Offer to Admin / Catalog because I feel that it should go there because it is a product config after all.

 

Have you had a chance to work on it at all?


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Hey Howard, I have been working a little on the Admin side of things. I got it to list all the products that currently have Make an Offer enabled on the screen at Admin / Configuration / Make an Offer AND I moved the Admin / Configuration / Make an Offer to Admin / Catalog because I feel that it should go there because it is a product config after all.

 

Have you had a chance to work on it at all?

 

No, not yet. I made some database layout sketches right after the initial release but than moved on to creating a real time shipping calculator which was more urgent for me to have. I have a real store and auctions to handle also besides the webshop and it's merely a matter of finding enough time to make a good start with a full blown admin side of MAO. Although it is not ideal to handle the follow ups after the initial offer it is workable for me as it is now which doesn't mean I am in no need to have things handled more automatically. So I can't put a time frame on the full blown Admin handling part of MAO but whenever I can afford to loose a few days on starting to program this and have something workable I'll let you know as you seem to want to use it also seriously.

 

As for your remark about the percentage config setting: I felt the percentage setting was something to be with the overall configuration while the rest, when it's there, indeed belongs to the Catalog part. I'm not sure if it will be better to keep all things together or leave it as it is with a tiny part in the overall configuration and the larger part with the product configuration.

Share this post


Link to post
Share on other sites
I just installed Make an Offer 2.2.

 

I followed all the instructions and when I go to the admin - configuration - Make An Offer, I basically get a blank page:

 

It has the title "Make An Offer" and a header bar:

 

"Title      Value    Action"

Any tips on how I can troubleshoot what code is having problems?

 

I checked the HTTP errorlog and no errors are being reported.

 

Thank You,

Kevin

 

Hello Kevin,

 

It sounds like the underneath part of the SQL commands has not been imported into your database at all or not correctly:

INSERT INTO configuration VALUES ('', 'Maximum allowed offer percentage', 'MAO_MAX_OFFER_PERCENTAGE_ALLOWED', '20', 'The maximum percentage of the official price you will accept an offer for (ie. if the set price is 100 all offers below 80 will not be accepted for the default of 20%.).', last_insert_id(), '0', NULL, now(), NULL, NULL);

 

You should check through your phpMyAdmin, or whatever tool your host provides for looking directly into your database, if you have this entry.

If not import it afterall and it should be okay.

 

Regards,

Howard

Share this post


Link to post
Share on other sites

Thank You,

 

For some reason when I ran the insitial SQL INSERT...

 

It created the 'Maximum allowed offer percentage' with a conguration_group_id of 0 and a sort_order of 0. That is why it was not displaying. I changed it to configuration_group_id of 1.

 

Thanks again,

Kevin

Share this post


Link to post
Share on other sites
Hey Howard, I have been working a little on the Admin side of things. I got it to list all the products that currently have Make an Offer enabled on the screen at Admin / Configuration / Make an Offer AND I moved the Admin / Configuration / Make an Offer to Admin / Catalog because I feel that it should go there because it is a product config after all.

 

Have you had a chance to work on it at all?

 

I see what I was doing now. This is what I have done. I have the Max percentage amount under Admin / Config / Maximum Values. It is now being displayed under Admin / Config / Make an Offer

 

I created a new file in the catalog/admin folder called make_an_offer and a new language file of the same. You get to it from Admin / Catalog / Make an Offer

 

So far, I have been able to get it to list all the products that currently have Make an Offer enabled on the screen in the list. The list currently has the following...

 

ID____MODEL____Product Price____Offers Enabled

 

Under the Offers Enabled column, it shows a green / red light (just like in Product Listings) and the green light means MAO is enabled for that product. From there, you can click the red to turn it off.

 

But I have to work on getting t=this working better because it currently displays ALL products but with the correct lights shown and when you click on the lights to turn off MAO, it does not do it.

 

As soon as I can get those 2 things working correctly, I will add more code so that when an offer is sent, it will be saved (customer's name, e-mail and offer amount) in the database.

 

Then when you open Admin / Catalog / Make an Offer, it will list all the products with MOS enabled, giving you the option to click on the red light to turn it off AND list the offered amount and by whom.

 

Then after highlighting one in the list, you will have an option to send a reply or delete that offer. If you send a reply, a new screen will open to allow you to e-mail your reply to that customer.

 

Or at least something of that sort. What do you all think?

 

It is harder that I though to do this as I know little about PHP and the SQL database calls and commands, but I am learning as I go from other files in the cart.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Hi there,

 

Can some of you that have had this working plz guide me :blush:

 

When the instructions comes to

 

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

 

Search For:

if ($action == 'new_product') {

$parameters = array('products_name' => '',

'products_description' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

'products_price' => '',

....

 

And Add:

'products_make_an_offer' => '',

 

Between:

'products_model' => '',

'products_image' => '',

 

So you will get:

....

'products_model' => '',

'products_make_an_offer' => '',

'products_image' => '',

....

 

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

 

Search for:

} elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {

 

$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

 

$product = tep_db_fetch_array($product_query);

 

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); $dup_products_id = tep_db_insert_id();

 

And Add:

products_make_an_offer

 

Between:

products_image en products_price voor zowel het gedeelte met "$product_query = tep_db_query( etc." en het gedeelte met "tep_db_query("insert into" . TABLE_PRODUCTS etc".

 

And also Add:

tep_db_input($product['products_make_an_offer']) . "', '" .

 

Between:

tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', '" .

 

So in the end you will get:

} elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { $product_query = tep_db_query("select products_quantity, products_model, products_image, products_make_an_offer, products_price,  products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

$product = tep_db_fetch_array($product_query);

 

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_make_an_offer, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" .

tep_db_input($product['products_make_an_offer']) . "', '" .

tep_db_input($product['products_price']) . "', now() , '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); $dup_products_id = tep_db_insert_id();

 

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

 

Search For:

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

And Add:

p.products_make_an_offer

 

Between:

p.products_price en p.products_weight

 

So you will get:

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_make_an_offer, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

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

 

Search For:

    if (!isset($pInfo->products_status)) $pInfo->products_status = '1';

    switch ($pInfo->products_status) {

      case '0': $in_status = false; $out_status = true; break;

      case '1':

      default: $in_status = true; $out_status = false;

    }

 

And Add below that (just above the ?>):

    if (!isset($pInfo->products_make_an_offer)) $pInfo->products_make_an_offer = '0';

    switch ($pInfo->products_make_an_offer) {

      case '0': $in_status_offer = false; $out_status_offer = true; break;

      case '1': $in_status_offer = true; $out_status_offer = false; break;

      default: $in_status_offer = false; $out_status_offer = true;

    }

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

 

Search For:

      <tr class="dataTableHeadingRow">

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>

      </tr>

 

And Replace With:

      <tr class="dataTableHeadingRow">

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_MAO; ?></td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>

      </tr>

 

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

 

Search For:

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <b>' . $categories['categories_name'] . '</b>'; ?></td>

<td class="dataTableContent" align="center"> </td>

<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>

      </tr>

 

 

And Replace With:

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <b>' . $categories['categories_name'] . '</b>'; ?></td>

<td class="dataTableContent" align="center"> </td>

<td class="dataTableContent" align="center"> </td>

<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>

      </tr>

 

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

 

Search For:

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td>

<td class="dataTableContent" align="center">

 

 

And Add Underneath:

<!-- Activate or deactivate the Make an Offer button -->

<?php

      if ($products['products_make_an_offer'] == '1') {

  echo tep_image(DIR_WS_IMAGES . 'icon_status_green_mao.gif', IMAGE_ICON_STATUS_OFFER_DEACTIVATE, 10, 10) . '  <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflagoffer&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light_mao.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';

      } else {

  echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflagoffer&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light_mao.gif', IMAGE_ICON_STATUS_OFFER_ACTIVATE, 10, 10) . '</a>  ' . tep_image(DIR_WS_IMAGES . 'icon_status_red_mao.gif', IMAGE_ICON_STATUS_RED, 10, 10);

      }

?></td>

<td class="dataTableContent" align="center">

 

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

 

 

Search For:

$contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);

 

And Add Underneath:

// Find if product is on special

$product_query_special = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id= '" . (int)$pInfo->products_id . "' and status");

$product = tep_db_fetch_array($product_query_special);

 

if ($product) {

  $product_is_special = true;

} else {

  $product_is_special = false;

}

 

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

 

Search For:

$contents[] = array('text' => '<br>' . TEXT_PRODUCTS_MAKE_AN_OFFER . ' ' . ($pInfo->products_make_an_offer ? TEXT_PRODUCT_MAKE_AN_OFFER_YES : TEXT_PRODUCT_MAKE_AN_OFFER_NO) . '<br>' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br><br>' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);

 

And Replace With:

$contents[] = array('text' => '<br>' . TEXT_PRODUCTS_IS_SPECIAL . ' ' . ($product_is_special ? TEXT_PRODUCT_IS_SPECIAL_YES : TEXT_PRODUCT_IS_SPECIAL_NO) . '<br>' . TEXT_PRODUCTS_MAKE_AN_OFFER . ' ' . ($pInfo->products_make_an_offer ? TEXT_PRODUCT_MAKE_AN_OFFER_YES : TEXT_PRODUCT_MAKE_AN_OFFER_NO) . '<br>' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br><br>' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);

 

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

 

I stop. These parts are not in my files. They are not in the "original" files either. Is it because it is not from the general.php or because another contrib is required or?

 

Thanks

Share this post


Link to post
Share on other sites
Hi there,

 

Can some of you that have had this working plz guide me  :blush:

 

When the instructions comes to

I stop. These parts are not in my files. They are not in the "original" files either. Is it because it is not from the general.php or because another contrib is required or?

 

Thanks

 

bssbsd,

 

All these changes are still falling under:

5) Make the following changes to your catalog/admin/categories.php

  (be extra extra careful if you have made some other changes already to this file!!):

so that is the file you will find them in and where you make these changes.

 

HTH

Share this post


Link to post
Share on other sites
bssbsd,

 

All these changes are still falling under:

 

so that is the file you will find them in and where you make these changes.

 

HTH

 

Damn thx :) didnt se that one :) anyway have been working a little with the DB now, and cant seem to remove this faul. Anything you have seen before? Thanks a lot :)

 

1054 - Unknown column 'p_products_make_an_offer' in 'field list'

 

select p.products_id, pd.products_name, p.products_quantity, p.products_image, p_products_make_an_offer, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by pd.products_name

Share this post


Link to post
Share on other sites
Damn thx :) didnt se that one :) anyway have been working a little with the DB now, and cant seem to remove this faul. Anything you have seen before? Thanks a lot :)

 

1054 - Unknown column 'p_products_make_an_offer' in 'field list'

 

select p.products_id, pd.products_name, p.products_quantity, p.products_image, p_products_make_an_offer, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by pd.products_name

 

You should really go through the installation instructions step by step:

1) Execute the following SQL statements through your phpMyAdmin/cPanel etc.
Choose either for the English SQL statements or the Dutch ones, NOT BOTH !!

- For English
ALTER TABLE `products` ADD `products_make_an_offer` TINYINT(1) DEFAULT '0' NOT NULL;

INSERT INTO `configuration_group` VALUES ('', 'Make An Offer', 'The options to configure the MaO button.', '1', '1');
UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();

INSERT INTO configuration VALUES ('', 'Maximum allowed discount percentage for an offer', 'MAO_MAX_OFFER_PERCENTAGE_ALLOWED', '20', 'The maximum discount percentage related to the official price for which you still will accept an offer (ie. if the set price is 100 all offers below 80 will not be accepted for the default of 20%.).', last_insert_id(), '0', NULL, now(), NULL, NULL);

- For Dutch:
ALTER TABLE `products` ADD `products_make_an_offer` TINYINT(1) DEFAULT '0' NOT NULL;

INSERT INTO `configuration_group` VALUES ('', 'Doe een Bod', 'De opties voor het configureren van de DeB button.', '1', '1');
UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();

INSERT INTO configuration VALUES ('', 'Maximum toegestaan kortingspercentage voor een bod', 'MAO_MAX_OFFER_PERCENTAGE_ALLOWED', '20', 'Het maximale kortingspercentage ten opzichte van de officiele prijs waarvoor een bod nog wordt geaccepteerd (bijv. als de prijs 100 is zullen alle biedingen beneden de 80 niet geaccepteerd worden bij de default instelling van 20%).', last_insert_id(), '0', NULL, now(), NULL, NULL);


or use the file make_an_offer_nederlands.sql or
make_an_offer_english.sql to import the statements to your database.

 

If you don't add the appropriate fields to your database throught the above SQL commands (or provided file) you will get this kind of error messages.

 

HTH

Share this post


Link to post
Share on other sites

thanks for your fast reply.

 

I have executed this and gone through the installation several times, but still it does this. Ill just run over it one more time :)

 

Thanks again for you help.

Share this post


Link to post
Share on other sites
thanks for your fast reply.

 

I have executed this and gone through the installation several times, but still it does this. Ill just run over it one more time :)

 

Thanks again for you help.

 

Walked the all through again, sorry to say it all matches what has been written. But since everybody gets it to work I belive its my system.. :'(

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  

×