Jump to content
Sign in to follow this  
ledave

movie details warnings

Recommended Posts

indeed, you're totaly right. My mistake, sorry :)

I already see one thing in your code that make it imposible to works: the field where you introduce the disc's number is called disc_number (line 1045), and on line 1327 you make a check to see if there is any post variable for disc_num, which of course will never append. Change one of those 2 lines and tell me if it works better.

 

Anyway I'd recomend you to name all the variable and the db field the same way, it makes it more easy to read/understand it and avoid you this type of error.

Good luck

 

Thanks you, ledave !!!

Now database can store value for disc number :P

But it not display at the product pages =.="

Like this :-

http://shopping.forum-talk.com/diehardwith...eance-p-12.html

 

And how can i change the location as the picture below ?

 

http://img222.imageshack.us/img222/341/1sv0.jpg

 

I try to move the code below:-

<p><?php echo stripslashes($product_info['products_description']); ?></p>

 

after

 

<?php
//begin of movie details
$movie_details_query = tep_db_query("select count(*) as movie_details from " . TABLE_MOVIES_INFO . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
if (tep_db_num_rows($movie_details_query) > 0){
	include(DIR_WS_MODULES . FILENAME_MOVIE_DETAILS);
}
//end of movie details

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>

 

But the description part will missing ....

Share this post


Link to post
Share on other sites

well if it's not showing it it's that the code is wrong (remember, php always do what you tell him; if you're wrong he cannot do anything ;)). Show the code of your catalog/includes/modules/movies_detail.php.

 

And to move it, put it just BEFORE

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

and that shoul do it. Pay atention to closing and opening php tags.

 

cu

Share this post


Link to post
Share on other sites
well if it's not showing it it's that the code is wrong (remember, php always do what you tell him; if you're wrong he cannot do anything ;)). Show the code of your catalog/includes/modules/movies_detail.php.

 

And to move it, put it just BEFORE

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

and that shoul do it. Pay atention to closing and opening php tags.

 

cu

 

Ledave, thanks again !!

html tage cannot function between <?php and ?>, right ?

 

And this is my movie_detail.php

 

<script>
<!--
wmtt = null;

document.onmousemove = updateWMTT;

function updateWMTT(e) {
x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;
if (wmtt != null) {
wmtt.style.left = (x + 20) + "px";
wmtt.style.top = (y + 20) + "px";
}
}

function showWMTT(id) {
wmtt = document.getElementById(id);
wmtt.style.display = "block"
}

function hideWMTT() {
wmtt.style.display = "none";
}
//-->
</script>
<style>
.tooltip {
position: absolute;
display: none;
background-color: #E4E4E4;
}
</style>
	  <table border="0" cellspacing="0" cellpadding="2">
		<tr>
		  <td class="main" colspan="2"><?php echo (isset($movie_details['movie_disc_num']) && $movie_details['movie_disc_num'] != 0) ?TEXT_MOVIE_DETAILS; ?></td>
		</tr>
		<tr>
		  <td class="main" colspan="2">
<?php
$director_query = tep_db_query("select mp.people_id, mp.director, mp.picture from " . TABLE_MOVIES_PEOPLE . " mp natural join " . TABLE_MOVIES_INFO . " mi where mi.people_id = mp.people_id and mi.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and mp.director != ''");
$director = tep_db_fetch_array($director_query);
$id = $director['people_id'];
echo (isset($director['director']) ? TEXT_DIRECTOR . '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'people=' . $director['people_id']) . '" onMouseOver="showWMTT('. $id .')" onMouseOut="hideWMTT()" alt="' . TEXT_SEE_ALL_MOVIES . $director['director'] . '" title="' . TEXT_SEE_ALL_MOVIES . $director['director'] . '">' . $director['director'] . '</a><br>' : '');
echo '<div class="tooltip" id="'.$id.'"><img src="' . DIR_WS_IMAGES . $director['picture'] . '" /></div>';
$actor_query = tep_db_query("select mp.people_id, mp.actor, mp.picture from " . TABLE_MOVIES_PEOPLE . " mp natural join " . TABLE_MOVIES_INFO . " mi where mi.people_id = mp.people_id and mi.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and mp.actor != '' order by mi.movies_info_id");
if (tep_db_num_rows($actor_query) > 0){
echo TEXT_ACTOR;
$coma = 1;
while ($actor = tep_db_fetch_array($actor_query)){
	echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'people=' . $actor['people_id']) . '" onMouseOver="showWMTT('. $actor['people_id'] .')" onMouseOut="hideWMTT()" alt="' . TEXT_SEE_ALL_MOVIES . $actor['actor'] . '" title="' . TEXT_SEE_ALL_MOVIES . $actor['actor'] . '">' . $actor['actor'] . '</a>' . (($coma < tep_db_num_rows($actor_query)) ? ', ' : '');
	echo '<div class="tooltip" id="'.$actor['people_id'].'"><img src="' . DIR_WS_IMAGES . $actor['picture'] . '" /></div>';
	$coma++;
}
echo '<br>';
}
$movie_parent_query = tep_db_query("select distinct miv.movies_info_parent_id from " . TABLE_MOVIES_INFO_VALUE . " miv, " . TABLE_MOVIES_INFO . " mi where miv.movies_info_value_id = mi.movies_info_value_id and mi.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and miv.language_id = '" . (int)$languages_id . "' order by miv.movies_info_parent_id");
while ($movie_parent = tep_db_fetch_array($movie_parent_query)){
$coma = 1;
$movies_info_parent_query = tep_db_query("select movies_info_value from " . TABLE_MOVIES_INFO_VALUE . " where movies_info_value_id = '" .$movie_parent['movies_info_parent_id'] . "' and language_id = '" . (int)$languages_id . "'");
$movies_info_parent = tep_db_fetch_array($movies_info_parent_query);
echo ucfirst($movies_info_parent['movies_info_value']) . ': ';
$movie_info_values_query = tep_db_query("select miv.movies_info_value from " . TABLE_MOVIES_INFO_VALUE . " miv, " . TABLE_MOVIES_INFO . " mi where miv.movies_info_parent_id = '" . $movie_parent['movies_info_parent_id'] . "' and mi.movies_info_value_id = miv.movies_info_value_id and mi.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and miv.language_id = '" . (int)$languages_id . "' order by mi.movies_info_value_id");
while ($movie_info_value = tep_db_fetch_array($movie_info_values_query)){
	echo ucfirst($movie_info_value['movies_info_value']) . (($coma < tep_db_num_rows($movie_info_values_query)) ? ', ' : '');
	$coma++;
}
echo '<br>';
}
$movie_details_query = tep_db_query("select movie_reg_cod, movie_length from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$movie_details = tep_db_fetch_array($movie_details_query);
$region_codes[] = array('id' => '1',
'text' => '1');
$region_codes[] = array('id' => '2',
'text' => '2');
$region_codes[] = array('id' => '3',
'text' => '3');
$region_codes[] = array('id' => '4',
'text' => '4');
$region_codes[] = array('id' => '5',
'text' => '5');
$region_codes[] = array('id' => '6',
'text' => '6');
$region_codes[] = array('id' => '7',
'text' => 'All');
echo (($movie_details['movie_reg_cod']) != '0') ? TEXT_REG_COD . $region_codes[$movie_details['movie_reg_cod']-1]['text'] . '<br>' : '';
echo (isset($movie_details['movie_length']) && $movie_details['movie_length'] != 0) ? TEXT_MOVIE_LENGTH . $movie_details['movie_length'] . ' min'. '<br>': '';
echo (isset($movie_details['movie_disc_num']) && $movie_details['movie_disc_num'] != 0) ? TEXT_MOVIE_DISC_NUM . $movie_details['movie_disc_num'] : '';
?>
		  </td>
		</tr>
	  </table>

Share this post


Link to post
Share on other sites

Hi

 

Thanks for the great Contrib.

 

I get a lot of errors in the admin area.

 

Languages:

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 857

French

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 857

Spanish

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 857

Japanese

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 857

German

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 857

Dutch

New language:

 

 

Subtitles:

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 879

Italian

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 879

German

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 879

Ducth

New language for subtitles:

 

 

Type:

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 901

Action

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 901

Drama

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 901

Comedy

New type:

 

 

Audio format:

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 923

Dolby Surround 5.1

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 923

mono

New audio format:

 

 

Picture Format:

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 945

16:9 Wide-Screen

New Picture Format:

 

 

Others:

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 967

Interactive Menus

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 967

Chapter Selection

Warning: in_array(): Wrong datatype for second argument in /home/devweb/mysite.com/user/htdocs/catalog/admin/categories.php on line 967

filmografies

 

Any suggestions?

 

This was installed on a vanilla cart.

Share this post


Link to post
Share on other sites

I also get this if I try to view a product

 

1146 - Table 'mysitedb.TABLE_ORDERS' doesn't exist

 

select p.products_id, p.products_image from orders_products opa, orders_products opb, TABLE_ORDERS o, products p where opa.products_id = '79' and opa.orders_id = opb.orders_id and opb.products_id != '79' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 6

 

[TEP STOP]

Edited by DeadDingo

Share this post


Link to post
Share on other sites

I have found that the errors only appear for the first time for existing products. If I enter something into them, it will be OK after that.

 

New items are OK straight away

Share this post


Link to post
Share on other sites
@raskolt: sorry for the wait, I've just passed 1 week in the "Real World", far from the web...how bizarre! Regarding your problem, have you checked that the condition is met in order to display the mod? I mean, in this mod, in the product_info.php there is a sql query that check if there is something in the database about movie info to display. This piece of code:
//begin of movie details
$check_movie_details_query = tep_db_query("select movies_info_id from " . TABLE_MOVIES_INFO . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
if (tep_db_num_rows($check_movie_details_query) > 0){
	include(DIR_WS_MODULES . FILENAME_MOVIE_DETAILS);
}
//end of movie details

As you can see, it only checks that there is something in the movies_info table about the product. As you tell me that what you've add is in the products table it may be the cause. You should change this query to select the info you need. If this is not the problem, post your code and I'll have a look. Also if you have it online it could be useful for me to see it.

cheers.

 

Hello David

 

You already saved me writing a lot of code by producing this contrib. So no problem for me. In the meantime, I already worked on other parts of the store. Its url is www.guidesoftware.net/shop. It is in Turkish.

 

Finally, I understand the problem. I saved them to the products table like movie_length variable, but I tried to save them as varchar. When I changed it to an integer variable, everything worked fine. I think I can not save them as varchar to the products table or I missed some code.

 

Now I am trying to add three more internet addresses to the details. I am planning to add them into the code you wrote.

 

May I ask a last question? Where are the "LANGUAGES" and "SUBTITLES" language files. I could not find them. I want to translate them into Turkish.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

good morning everybody,

 

@aHfUi: you need to select the column in your sql query: change

$movie_details_query = tep_db_query("select movie_reg_cod, movie_length from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

to

$movie_details_query = tep_db_query("select movie_reg_cod, movie_length, movie_disc_num from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

and the disc's number will appear.

 

@DeadDingo: glad you like it, and that the errors are solved. But normally with the latest version those warning would not show up. What version have you downloaded?

About the TABLE_ORDERS problem, you should check the catalog/admin/includes/filenames.php to see that it is defined.

 

@raskolt: yes you can store the data as varchar in the db, but you will have to set the column as varchar.

May I ask a last question?
of course you, that's why we are here :). There aren't any language files for languages and subtitles, it's all stored in the db. If you look at the movies_info_value table, you'll see that each movies_info_value is defined with an id and the language_id. I think the best you can do is open the sql file from the contrib and edit it with your values: eliminate the language's ids you don't use in your store and put the turkish id, as well as the word in turkish.

 

good code everybody. keep me update with your progresses.

cheers

Share this post


Link to post
Share on other sites

Thanks ledave,

i will try it :P

 

DeadDingo,

i thinks it is normal.

Because i meet the problem too.

what i do is update the products detail, look like select the language for it.

Then the error msg won't come out again.

Share this post


Link to post
Share on other sites

I downloaded the 2nd version.

 

My workaround was to just select the correct region code and submit it. Then I went back in again and all was OK.

 

 

One thing I noticed for the "Extras" area. It was defined as "Extra" (or the other way round)

 

So everything is good now:)

Share this post


Link to post
Share on other sites

The errors dead dingo pointed out are VERY annoying. Anyone figured out what the REAL fix is yet?

Share this post


Link to post
Share on other sites

has anyone made a drop down box for actors similar top manufacturers?

 

I have the code to get the actors names in to the box but its not sending the results to advanced serach results...

 

Can anyone help???

 

<tr>

<td><?php

 

 

// Display a drop-down

$actor_array = array();

if (tep_db_num_rows($actor_query) > 0){

$actor_array[] = array('id' => '', 'text' => 'Browse By Actor');

}

 

while ($actor = tep_db_fetch_array($actor_query)) {

$actor = ((strlen($actor['actor']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($actor['actor'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $actor['actor']);

$actor_array[] = array('id' => $actor['actor'],

'text' => $actor);

}

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('actor', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'people=' . $actor['people_id']), 'get'),

'text' => tep_draw_pull_down_menu('actor', $actor_array, (isset($HTTP_GET_VARS['actor']) ? $HTTP_GET_VARS['actor'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 95%"') . tep_hide_session_id());

}

 

new infoBox($info_box_contents);

?>

</td>

</tr>

Share this post


Link to post
Share on other sites

Is there any support for this contribution?

 

I am using osCommerce Online Merchant v2.2 RC1 and I was going to install this until I realized the 1st file I needed to make changes to which is /catalog/product_info.php does not contain these lines

 

 

line 120
change from:
<?php
   $products_attributes_query = tep_db_query("select movies_info_id from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>

 

I have already added some of the features that this features offers with extra fields in the desciption but the thing I like about this is that it allows uploads of stars pictures and there is a list of all movies generated that each person starred in as well as how easy it is to add an existing star to a new movie...

 

Can anyone offer any insight or help?

Share this post


Link to post
Share on other sites

Hello all,

It my firts post here.

My problem is:

I installed movie details off line and work very well, but on line the links it doesn´t work.

Please, nee help with this.

Take a look:

www.dvdinternacional.com.ar

 

Thks,

 

Paul

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  

×