Post by paulrm6 » Tue Feb 28, 2012 7:12 am

Hi Everyone,
I'm new to OpenCart, but do have a lot of PHP, HTML and CSS knowledge...
What I want to do, is when I add a product, to be able to add certain 'Atrributes' if you like, which get shown on the product grid AS WELL as the product page...
I've had a fiddle around but to no end...
e.g. My client is a camping shop, and some of their products are recommended by the DofE award, and they want customers to easily see this before clicking into the product.
Also solution needs to be free if possible,
Thank you so much!
Paul

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Tue Feb 28, 2012 8:30 am

@ paul

I'd be more than happy to help you work through this, but it would be helpful if you could post some specific questions about steps where you are getting hung up, and what kind of errors you are seeing.

It sounds like what you will need to do is add an additional field to the Product Entry Form in the Admin section that could be a simple Boolean. At that point, you would need to edit the Category View & Controller files and insert the necessary HTML to display a graphic if this value is true.

Let me know where you're getting hung up on implementing this.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Wed Feb 29, 2012 1:36 am

SkipperTheEyechild wrote:@ paul

I'd be more than happy to help you work through this, but it would be helpful if you could post some specific questions about steps where you are getting hung up, and what kind of errors you are seeing.

It sounds like what you will need to do is add an additional field to the Product Entry Form in the Admin section that could be a simple Boolean. At that point, you would need to edit the Category View & Controller files and insert the necessary HTML to display a graphic if this value is true.

Let me know where you're getting hung up on implementing this.
For the moment, I am not going to edit the admin files, instead all I want to understand is the Category View & Controller files.
I am inserting two new fields into the database "product_description" one named 'dofe' the other named 'new'...
They need only be values of 1 or null, to distinguish between on, and off.
On the products page, I will need it to display text saying NEW! in small red writing, or Dofe Approved depending on what the values of the database are... I have no clear indication of how to start on this...
Thanks, Paul

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Wed Feb 29, 2012 2:18 am

@ paul

I'm working with the default template files. Hopefully things are still named the same or similar if you are in another theme.

Let's say you want to add the "DOFE" text directly after the "Availability: In Stock" notice on the product page.

1. Start with the Product View file: /catalog/view/theme/YOUR THEME/template/product/product.tpl

2. Search for <div class="description"> and replace that entire <div> with this:

Code: Select all

<div class="description">
        <?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?>
        <span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
        <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
        <span><?php echo $text_stock; ?></span> <?php echo $stock; ?><br />
	<?php if($dofe){ ?>        
		<span><?php echo $text_dofe; ?></span> [Image Link] <!-- new item! -->
	<?php } // endif ?>
</div>
3. Open the Product Controller file: /catalog/controller/product/product.php

4. Search for 'text_stock' (with or without quotes) and copy that entire line and paste it directly below and rename the variable:

Code: Select all

$this->data['text_stock'] = $this->language->get('text_stock');
$this->data['text_dofe'] = $this->language->get('text_dofe');
5. Search for data['stock'] and add the stuff under /** New Item! **/ to look like this:

Code: Select all

/** don't add this **/
if ($product_info['quantity'] <= 0) {
	$this->data['stock'] = $product_info['stock_status'];
} elseif ($this->config->get('config_stock_display')) {
	$this->data['stock'] = $product_info['quantity'];
} else {
	$this->data['stock'] = $this->language->get('text_instock');
}

/** DOFE Item! **/
if ($product_info['dofe']) {
	$this->data['dofe'] = $product_info['dofe'];
} else {
        $this->data['dofe'] = 0;
}
6. Open Product Language file: /catalog/language/product/product.php

7. Add a new line after 'text_error':

Code: Select all

$_['text_dofe'] = 'DOFE:';  // or to your liking
That will add the item to the product page. Very similar to add it to the Category pages as well. Let me know if I need to clarify anything here.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Wed Feb 29, 2012 2:46 am

Brilliant!
That works perfectly, however, I'm also trying to integrate it in the categories page, and things are getting confusing, sorry, if you can help?
P.S. I am using the default template.
Thanks so much!
Paul
EDIT: I am still trying to get catergories to work... I assumed I must change the code to..

Code: Select all

if ($category_info['dofe']) {
   $this->data['dofe'] = $category_info['dofe'];
} else {
        $this->data['dofe'] = 0;
}
This is producing an error saying...
Notice: Undefined index: dofe in /home/theadv11/public_html/catalog/controller/product/category.php on line 116
Able to shed some light?

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Wed Feb 29, 2012 3:43 am

@ paul

Let me ask you this. Did you define a column named 'dofe' in the category_description or category table in the database?

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Wed Feb 29, 2012 3:47 am

No i didn't...
Sorry, can you give me another walk through for categories like you did for products please?
Baring in mind what I want is the individual products in the product lists to have different values, not the category as a whole.
Thank you so much!

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Wed Feb 29, 2012 4:15 am

@ paul

True. You wouldn't want to add those columns to the category table.

What you need to do rather than defining the variable as you are:

Code: Select all

if ($category_info['dofe']) {
   $this->data['dofe'] = $category_info['dofe'];
} else {
        $this->data['dofe'] = 0;
}
You need to scroll down in your Category Controller file and look for "$this->data['products'][] = array" and change this:

Code: Select all

$this->data['products'][] = array(
	'product_id'  => $result['product_id'],
	'thumb'       => $image,
	'name'        => $result['name'],
	'description' => mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
	'price'       => $price,
	'special'     => $special,
	'tax'         => $tax,
	'rating'      => $result['rating'],
	'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
	'href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'])
);
into this:

Code: Select all

$this->data['products'][] = array(
	'product_id'  => $result['product_id'],
	'thumb'       => $image,
	'name'        => $result['name'],
	'description' => mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
	'price'       => $price,
	'special'     => $special,
	'tax'         => $tax,
	'rating'      => $result['rating'],
	'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
	'href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']),
        'dofe'        => $result['dofe']
);
All I did was add:

'dofe' => $result['dofe']

onto the end of the array. You will also need to change the way you check for the variable in the Template file like this:

Code: Select all

<?php if($product['dofe']){ ?>
   stuff here
<?php } ?>
And that should get your custom variables showing up on the Categories page.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Wed Feb 29, 2012 5:56 am

Brilliant, that worked perfectly, now I have got that sorted, can you help me add two check boxes in my Admin section under the general tab when adding a new product to define dofe and pnew please? :)
Thank you so much for this!

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Wed Feb 29, 2012 7:33 am

@ paul

Files you are going to need:

/admin/controller/catalog/product.php (Product Controller)
/admin/model/catalog/product.php (Product Model)
/admin/language/english/catalog/product.php (Product Language)
/admin/view/template/catalog/product_form.tpl (Product View)

Open your Product View file and look for:

Code: Select all

<tr>
      <td><?php echo $entry_meta_description; ?></td>
      <td><textarea name="product_description[<?php echo $language['language_id']; ?>][meta_description]" cols="40" rows="5"><?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['meta_description'] : ''; ?></textarea></td>
</tr>
Copy and paste that entire thing directly above itself. Now make it look like this:

Code: Select all

<tr>
      <td><?php echo $entry_custom_labels; ?></td>
      <td>
            <input type="checkbox" name="dofe" value="1" <?php if ($dofe) { echo 'checked="checked"'; } ?> />
            <?php echo $text_label_dofe; ?>
            <input type="checkbox" name="pnew" value="1" <?php if ($pnew) { echo 'checked="checked"'; } ?> />
            <?php echo $text_label_pnew; ?>
      </td>
</tr>
</tr>
Now open your Product Controller file and search for 'entry_layout' (around line 586 inside the getForm() function) and add this:

Code: Select all

$this->data['entry_custom_labels'] = $this->language->get('entry_custom_labels');
$this->data['text_label_dofe'] = $this->language->get('text_label_dofe');
$this->data['text_label_pnew'] = $this->language->get('text_label_pnew');
While still in the Product Controller you want to search for this: if (isset($this->request->post['model'])) { (which should be around line 719 prior to any editing) and add this directly before it:

Code: Select all

if (isset($this->request->post['dofe'])) {
    $this->data['dofe'] = $this->request->post['dofe'];
} elseif (!empty($product_info)) {
    $this->data['dofe'] = $product_info['dofe'];
} else {
    $this->data['dofe'] = '';
}
if (isset($this->request->post['pnew'])) {
    $this->data['pnew'] = $this->request->post['pnew'];
} elseif (!empty($product_info)) {
    $this->data['pnew'] = $product_info['pnew'];
} else {
    $this->data['pnew'] = '';
}
Moving on, open up your Product Language file and add this under ['text_amount']:

Code: Select all

$_['text_label_dofe']            = 'DOFE Award'; // or whatever
$_['text_label_pnew']            = 'New Item!';
$_['entry_custom_labels']      = 'Awards or New';  // again, whatever you want here
Open up your Product Model file and get ready to edit the SQL! First, let's change the addProduct() SQL Query to look like this (just the first large one):

Code: Select all

$this->db->query("INSERT INTO " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . $this->db->escape($data['tax_class_id']) . "', sort_order = '" . (int)$data['sort_order'] . "', dofe = '" . (int)$data['dofe'] . "', pnew = '" . (int)$data['pnew'] . "', date_added = NOW()");
All I did to that was account for your new $pnew and $dofe variables near the end of the SQL query. Now update your editProduct() SQL Query to look like this (just the large one):

Code: Select all

$this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . $this->db->escape($data['tax_class_id']) . "', sort_order = '" . (int)$data['sort_order'] . "', dofe = '" . (int)$data['dofe'] . "', pnew = '" . (int)$data['pnew'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
Again, not much of a change, just accounted for the new variables at the bottom of the query. I haven't tested all of this yet, but it should work just fine. Let me know if you experience any problems.

Just remember this: all variables used in the Template need to be defined in the Controller, and if you are getting undefined variables for language variables (such as $text_label_dofe) you need to make sure and add it to the language file AND define it in the Controller.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Wed Feb 29, 2012 8:04 am

Hi there,
thanks for the code, however I get this error message come up...

Code: Select all

Notice: Undefined index: dofe in /home/theadv11/public_html/admin/model/catalog/product.php on line 123Notice: Error: Unknown column 'dofe' in 'field list'
Not sure what it means?
Thanks

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Wed Feb 29, 2012 8:17 am

@ paul

Are there 'dofe' and 'pnew' columns in your product table in the database? It looks like it is having an issue with trying to insert the data into fields that don't exist.

I suppose I assumed the data was in the product table. If it is in the product description table that will take some altering.

You will need to change your Product Template file so that rather than this:

Code: Select all

<tr>
      <td><?php echo $entry_custom_labels; ?></td>
      <td>
            <input type="checkbox" name="dofe" value="1" <?php if ($dofe) { echo 'checked="checked"'; } ?> />
            <?php echo $text_label_dofe; ?>
            <input type="checkbox" name="pnew" value="1" <?php if ($pnew) { echo 'checked="checked"'; } ?> />
            <?php echo $text_label_pnew; ?>
      </td>
</tr>
you would have this:

Code: Select all

<tr>
      <td><?php echo $entry_custom_labels; ?></td>
      <td>
            <input type="checkbox" name="product_description[<?php echo $language['language_id']; ?>][dofe]" value="1" <?php if ($product_description[$language['language_id']['pnew']) { echo 'checked="checked"'; } ?> />
            <?php echo $text_label_dofe; ?>
            <input type="checkbox" name="product_description[<?php echo $language['language_id']; ?>][pnew]" value="1" <?php if ($product_description[$language['language_id']['pnew']) { echo 'checked="checked"'; } ?> />
            <?php echo $text_label_pnew; ?>
      </td>
</tr>
And then in your Product Model file, remove those variables that were added to the end of the SQL query, and instead look down a few lines from that large SQL query in editProduct() function where it says:

Code: Select all

foreach ($data['product_description'] as $language_id => $value) {
    $this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
}
and change it to this:

Code: Select all

foreach ($data['product_description'] as $language_id => $value) {
    $this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', dofe = '" . $this->db->escape($value['dofe']) . "', pnew = '" . $this->db->escape($value['pnew']) . "', description = '" . $this->db->escape($value['description']) . "'");
}
And then up further in the Product Model file in the addProduct() function change that large SQL query back to how it used to be (just remove those variables we added before) and then look down below it for where that same foreach() loop is going on for $data['product_description'] and change it to this:

Code: Select all

foreach ($data['product_description'] as $language_id => $value) {
    $this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', dofe = '" . $this->db->escape($value['dofe']) . "', pnew = '" . $this->db->escape($value['pnew']) . "', description = '" . $this->db->escape($value['description']) . "'");
}
Hopefully that should clear some things up. I'll check back in shortly, I've got to go run out and move a few things out of the old apartment.
Last edited by SkipperTheEyechild on Wed Feb 29, 2012 8:30 am, edited 1 time in total.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Wed Feb 29, 2012 8:26 am

Its in product description but I can just shift things round on my database so they're In products, I will do that tomorrow as my computer is off and let you know of it works.
Thanks so much for this, I've actually learnt a lot from it!

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by Ebenezer18 » Wed Feb 29, 2012 9:53 am

ImageLet me know where you're getting hung up on implementing this.

Newbie

Posts

Joined
Sun Feb 26, 2012 2:39 pm

Post by paulrm6 » Wed Feb 29, 2012 11:54 pm

Hi,
moved the dofe and pnew fields to the table products...
Now when adding a product and defining them for the first time in admin section it works, however when updating them, you get this error...

Code: Select all

Notice: Undefined index: dofe in /home/theadv11/public_html/admin/model/catalog/product.php on line 123Notice: Undefined index: pnew in /home/theadv11/public_html/admin/model/catalog/product.php on line 123Warning: Cannot modify header information - headers already sent by (output started at /home/theadv11/public_html/admin/index.php:83) in /home/theadv11/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/theadv11/public_html/admin/index.php:83) in /home/theadv11/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29
Any suggestions?

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Thu Mar 01, 2012 2:04 am

@ paul

Could you possibly upload your Product Model, Controller and Template file? This might be easier if I can scan through what you've got and see if something stands out to me. It looks like maybe a variable is named incorrectly somewhere... possibly in your Product Template. I say this because the array elements are passed to the Model in the Controller as such:

Code: Select all

$this->model_catalog_product->editProduct($this->request->get['product_id'], $this->request->post);
And so each variable is equal to the name of an input element in the form. So in this case your checkbox element's names need to match the column name in your database.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Thu Mar 01, 2012 5:20 am

I've uploaded the files as a ZIP. Thanks

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Thu Mar 01, 2012 6:13 am

@ paul

Okay. Looking at your files, these are the changes that need to be made. Some of this I definitely overlooked.

In your Product Model do the following:

On line 454 - 457 you will find:

Code: Select all

'name'             => $result['name'],
'description'      => $result['description'],
'meta_keyword'     => $result['meta_keyword'],
'meta_description' => $result['meta_description']
Make it look like this:

Code: Select all

'name'             => $result['name'],
'description'      => $result['description'],
'meta_keyword'     => $result['meta_keyword'],
'meta_description' => $result['meta_description'],
'pnew' => $result['pnew'],
'dofe' => $result['dofe']
In your Template file you need to change the way you are calling your check boxes from this:

Code: Select all

<input type="checkbox" name="dofe" value="1" <?php if ($dofe) { echo 'checked="checked"'; } ?> />
<?php echo $text_label_dofe; ?>
<input type="checkbox" name="pnew" value="1" <?php if ($pnew) { echo 'checked="checked"'; } ?> />
to this:

Code: Select all

<input type="checkbox" name="product_description[<?php echo $language['language_id']; ?>][dofe]" value="1" <?php if ($product_description[$language['language_id']]['dofe'] == 1) { echo 'checked="checked"'; } ?> />
<?php echo $text_label_dofe; ?>
<input type="checkbox" name="product_description[<?php echo $language['language_id']; ?>][pnew]" value="1" <?php if ($product_description[$language['language_id']]['pnew'] == 1) { echo 'checked="checked"'; } ?> />
And in your Controller file you need to remove all of this (around line 721):

Code: Select all

if (isset($this->request->post['dofe'])) {
    $this->data['dofe'] = $this->request->post['dofe'];
} elseif (!empty($product_info)) {
    $this->data['dofe'] = $product_info['dofe'];
} else {
    $this->data['dofe'] = '';
}
if (isset($this->request->post['pnew'])) {
    $this->data['pnew'] = $this->request->post['pnew'];
} elseif (!empty($product_info)) {
    $this->data['pnew'] = $product_info['pnew'];
} else {
    $this->data['pnew'] = '';
}
And that should get you on your feet. You are still trying to access stuff in the Product Description table, correct?

Anyhow, a brief on what we did here was to rename the check box inputs so they would be part of the $product_description array, remove the old $dofe and $pnew variables from the Controller as we aren't using them anymore, and update the Model to pull out all the necessary fields from the Product Description and assign them to the $product_description array for when you are editing.

That should make it all work.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana

Post by paulrm6 » Thu Mar 01, 2012 6:26 am

Hi,
I'm still getting an error message?

Code: Select all

Notice: Undefined index: dofe in /home/theadv11/public_html/admin/model/catalog/product.php on line 132Notice: Undefined index: pnew in /home/theadv11/public_html/admin/model/catalog/product.php on line 132Warning: Cannot modify header information - headers already sent by (output started at /home/theadv11/public_html/admin/index.php:83) in /home/theadv11/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/theadv11/public_html/admin/index.php:83) in /home/theadv11/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29
Really sorry this is dragging on!
EDIT: Also the checkbox's aren't automatically checking if it is ticked in the database?

New member

Posts

Joined
Tue Feb 28, 2012 7:08 am

Post by SkipperTheEyechild » Thu Mar 01, 2012 7:23 am

@ paul

Alright Paul, I'm not really sure what exactly is happening there. I quickly did the previous steps with my own files and got it working without a hitch. The columns 'pnew' and 'dofe' are in my Product Description table.

So I've zipped my files (Product Controller, View, Language and Model) and provided them here. Backup your files and put these in there and see if you are still getting an error. If so, then we'll have to look elsewhere in your setup for the problem as these are working fine on mine.

User avatar
New member

Posts

Joined
Fri Feb 24, 2012 8:58 am
Location - Montana
Who is online

Users browsing this forum: No registered users and 57 guests