Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Imprint Text Options


Guest

Recommended Posts

I have just installed this and am getting this error when I try to access the admin side of my site.

 

1146 - Table '*******_osc2.TABLE_ADMINISTRATORS' doesn't exist

 

select id from TABLE_ADMINISTRATORS limit 1

 

[TEP STOP]

 

I used the import feature in phpmyadmin to install the install.sql file. Can someone tell me what I have done wrong and what I need to do to fix this?

 

Thanks in advance, Alex

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 337
  • Created
  • Last Reply

Top Posters In This Topic

I am receiving an error message in the admin panel. Everything is in place - everything works but if I click "insert" to add my own field I get this message...

 

The requested URL /admin/FILENAME_TEXT_ATTRIBUTES was not found on this server.

Yeah Yeah I am learning as I go... lol

Link to comment
Share on other sites

?>
           <tr>
             <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
             <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
           </tr>

	<tr><td height="10" colspan="2"></td></tr>

<?php
     }
?>

<!-- denuz products text attributes -->

    <tr>
      <td>

<?php
$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . (int)$HTTP_GET_VARS['products_id']);
while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
?>
  <tr>
    <td class=main><?php echo $text_attributes['products_text_attributes_name'] . ': </td><td>' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], ''); ?></td>
  </tr>
<?php
}
?>
      </table></td>
    </tr>

<!-- eof denuz products text attributes -->


</table>

<?php
   }
?>

<?php
   $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
   $reviews = tep_db_fetch_array($reviews_query);
   if ($reviews['count'] > 0) {
?>

 

 

I can't seem to make the text box appear on the product_info page unless I add an attribute to the page... then it shows up...

 

I have put some time in this contrib today lol... installed it once... popped a fuse - "restored" - installed again... everything was fine... then I realized that I tricked myself cause the first page I test it on had an attribute on it already.

 

So, then I put on some pages to go back later and realize it wasn't even there.

 

maybe Product Attributes - Option Type Feature is the way to go... but being that it's 2:31am - I'll sleep on it first.... :huh:

Yeah Yeah I am learning as I go... lol

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
I have just installed this and am getting this error when I try to access the admin side of my site.

 

1146 - Table '*******_osc2.TABLE_ADMINISTRATORS' doesn't exist

 

select id from TABLE_ADMINISTRATORS limit 1

 

[TEP STOP]

 

I used the import feature in phpmyadmin to install the install.sql file. Can someone tell me what I have done wrong and what I need to do to fix this?

 

Thanks in advance, Alex

 

Hi Alex ,

in my trial shop i had the same ,

this was before i did merge the files (i did just copy the files to my catalog ,to see if it did work )

 

the problem is in the database tables CATALOG/ADMIN/INCLUDES/DATABASE_TABLES.PHP

add : define('TABLE_ADMINISTRATORS', 'administrators');

 

But i didnt get this contributtion running yet .

im still busy with it

greet

Mandy

Link to comment
Share on other sites

Hi All,

I have the same problems ,,,,

 

on the first page ( index ) when i go to my shop :

 

Warning: include(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.include]: failed to open stream: No such file or directory in /public_html/webwinkel/index.php on line 321

 

Warning: include(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.include]: failed to open stream: No such file or directory in /public_html/webwinkel/index.php on line 321

 

Warning: include() [function.include]: Failed opening 'includes/modules/FILENAME_UPCOMING_PRODUCTS' for inclusion (include_path='.:/usr/local/lib/php') in /public_html/webwinkel/index.php on line 321

 

Then also on the same index where normaly the new products are showing:

 

 

Warning: include(includes/modules/FILENAME_NEW_PRODUCTS) [function.include]: failed to open stream: No such file or directory in public_html/webwinkel/index.php on line 318

 

Warning: include(includes/modules/FILENAME_NEW_PRODUCTS) [function.include]: failed to open stream: No such file or directory in public_html/webwinkel/index.php on line 318

 

Warning: include() [function.include]: Failed opening 'includes/modules/FILENAME_NEW_PRODUCTS' for inclusion (include_path='.:/usr/local/lib/php') in /public_html/webwinkel/index.php on line 318

 

Then when i click to vieuw one of my products:

Warning: include(includes/modules/FILENAME_NEW_PRODUCTS) [function.include]: failed to open stream: No such file or directory in /public_html/webwinkel/index.php on line 126

 

Warning: include(includes/modules/FILENAME_NEW_PRODUCTS) [function.include]: failed to open stream: No such file or directory in /public_html/webwinkel/index.php on line 126

 

Warning: include() [function.include]: Failed opening 'includes/modules/FILENAME_NEW_PRODUCTS' for inclusion (include_path='.:/usr/local/lib/php') in /public_html/webwinkel/index.php on line 126

 

 

in my admin :

 

/webwinkel/iadmin/FILENAME_TEXT_ATTRIBUTES?page=1&taID=2&action=edit was not found on this server.

 

The requested URL /webwinkel/iadmin/FILENAME_TEXT_ATTRIBUTES?page=1&taID=2&action=edit was not found on this server.

 

 

I found some solutions in this topic , so gonna try some

 

but i cant understand why he gives a error in the modules ?? i didnt change anything in the modules

 

hope someone knows how to fix this ?

tnx mandy

Edited by mandynl
Link to comment
Share on other sites

  • 3 weeks later...

Can anyone tell me if they have this working? I need this contrib but am completely lost when I look at download area. Is there not one download that has been cleaned. I need to be able to allow customer to complete a text field at time of order, and not as a comment when order is finished.

Link to comment
Share on other sites

I just spent the last 2 hours installing this addon that is exactly what I want. I started with version 1.3.1 and then installed just about every update to the contribution. I then went to my admin area, selected the "name" checkbox and updated my product. I went to the product info screen, and it is not showing anything where I can enter my imprint. I am using STS 4.5.8. Has anyone gotten this to work with STS 4.5.8?

 

Thanks.

Link to comment
Share on other sites

For anyone using the Simple Template System, you need to add the following to the file sts_product_info.php:

 

 

 

I put it just under the bit:

 

 

 

Then you need to add $textbox to where you want the boxes to be displayed in your template product_info.php.html

I put mine in the tabe with the $optionnames $optionchoices

 

 

Has anyone got this working with the PayPal IPN? I can't get the contents of the text boxes to follow through when using PayPal, but they work fine if paying by cheque.

I'm using sts 4.5.8, and I put this code in includes/modules/sts_inc/product_info.php:

// Text Attributes
$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']));
while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
$template_pinfo['monogramtextbox'] .= '<tr><td class=main>' . $text_attributes['products_text_attributes_name'] . ': ' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], '');
} 
// Text Attributes

And it works for products that have the checkbox checked for adding an imprint, but for products that I don't have this option on, I get my variable printed on the page, $monogramtextbox. How can this be modified to only show if the product has the imprint checkbox checked?

 

Thanks.

Link to comment
Share on other sites

It doesn't appear that what the user enters is working in my install. I am using STS 4.5.8 and got it show up on my product info page, and I have installed all the latest updates, but when a user enters what they want in the textbox, and add it to their cart, there is nothing showing on the shopping cart page, or during the checkout process, or even in the confirmation email that is sent. Could someone please give me any ideas why this would not be working? Here is the code I had to put in includes/modules/sts_inc/product_info.php

// Text Attributes
$text_attributes_query = tep_db_query("select pta.*, count(*) as total from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']));

while($text_attributes = tep_db_fetch_array($text_attributes_query)) {
//echo "<br /> inside while";
if ($text_attributes['products_text_attributes_name'] != "") {
	//while($next = each($text_attributes)) {
		$template_pinfo['monogramtextbox'] .= $text_attributes['products_text_attributes_name'] . ': ' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], '');
	//}
} else {
	$template_pinfo['monogramtextbox'] = '';
}
} 
// Text Attributes

Thanks.

Link to comment
Share on other sites

It appears to work when I have STS disabled. Has anyone gotten this to work with STS? Also, having installed all the updates for this addon, I don't see the checkbox on my product_info page with STS turned on, but if it is turned off, I see the Customize checkbox.

 

Thanks!

Link to comment
Share on other sites

Hi

 

I fixed it. I found out that there was a problem with the $osCsid in the query. I put the actual session ID from the database and it worked. SO as a solution, I wrapped $osCsid with tep_session_id(). and voila....

 

Do you think that we have to wrap other $osCsid's in your code? like in application_top.php, etc???

 

Thanks for the help.

Mardi

How did you get the charge to work? I've tried adding the tep_session_id($osCsid), but that didn't seem to help. I still have the checkbox on my page, and when I enter something in the textbox, the customqty value is 2.

 

Thanks!

Link to comment
Share on other sites

Hi

 

I fixed it. I found out that there was a problem with the $osCsid in the query. I put the actual session ID from the database and it worked. SO as a solution, I wrapped $osCsid with tep_session_id(). and voila....

 

Do you think that we have to wrap other $osCsid's in your code? like in application_top.php, etc???

 

Thanks for the help.

Mardi

I believe I finally got this working, but have a question. If I add say 4 monograms to products, and then decide to empty my cart, the customers_basket_text_attributes_qty still has 1 row with a qty of 4. Shouldn't this be deleted from the table? I believe this is causing the below sql error if I then go back and select the same product with the same imprint text:

1062 - Duplicate entry '32' for key 1

insert into customers_basket_text_attributes_qty values ('f4bab45e3c8a4b7c50760525668cbc05', 32, 1)

 

Does anyone know how to fix this?

 

Thanks!!

Edited by jrthor2
Link to comment
Share on other sites

  • 1 month later...

I've uploaded a new version that fixes two problems.

 

- In admin/orders.php, the wrong text attributes would be called if the product name was similar.

- On product_info.php, if text has already been entered for a product, going back to that product will now display the previous text.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack

 

I have just installed your version

 

The sql does not seem to allow you you specify the type of input, text box radio button etc

 

DROP TABLE IF EXISTS customers_basket_text_attributes;# MySQL returned an empty result set (i.e. zero rows).

CREATE TABLE customers_basket_text_attributes (
 session_id varchar(255) NOT NULL default '',
 products_id int(11) NOT NULL default '0',
 products_text_attributes_id int(11) NOT NULL default '0',
 products_text_attributes_text text NOT NULL,
 PRIMARY KEY  (session_id,products_id,products_text_attributes_id)
) TYPE=MyISAM;# MySQL returned an empty result set (i.e. zero rows).


DROP TABLE IF EXISTS orders_text_attributes;# MySQL returned an empty result set (i.e. zero rows).

CREATE TABLE orders_text_attributes (
 orders_id int(11) NOT NULL default '0',
 products_id int(11) NOT NULL default '0',
 products_text_attributes_id int(11) NOT NULL default '0',
 products_text_attributes_text text NOT NULL,
 PRIMARY KEY  (orders_id,products_id,products_text_attributes_id)
) TYPE=MyISAM;# MySQL returned an empty result set (i.e. zero rows).


DROP TABLE IF EXISTS products_text_attributes;# MySQL returned an empty result set (i.e. zero rows).

CREATE TABLE products_text_attributes (
 products_text_attributes_id int(11) NOT NULL auto_increment,
 products_text_attributes_name varchar(255) NOT NULL default '',
 PRIMARY KEY  (products_text_attributes_id)
) TYPE=MyISAM;# MySQL returned an empty result set (i.e. zero rows).


INSERT INTO products_text_attributes (products_text_attributes_id, products_text_attributes_name) VALUES (1, 'Name');# Affected rows: 1

INSERT INTO products_text_attributes (products_text_attributes_id, products_text_attributes_name) VALUES (2, 'Date');# Affected rows: 1


DROP TABLE IF EXISTS products_text_attributes_enabled;# MySQL returned an empty result set (i.e. zero rows).

CREATE TABLE products_text_attributes_enabled (
 products_id int(11) NOT NULL default '0',
 products_text_attributes_id int(11) NOT NULL default '0',
 PRIMARY KEY  (products_id,products_text_attributes_id)
) TYPE=MyISAM;# MySQL returned an empty result set (i.e. zero rows).

 

and the input box doesn't appear on the product info page

 

<!-- denuz products text attributes -->

  <tr>
	<td>

<?php
 $text_attributes_query = tep_db_query("select pta.*, cbta.products_text_attributes_text from products_text_attributes as pta, products_text_attributes_enabled as ptae, customers_basket_text_attributes as cbta where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']) . " and cbta.products_text_attributes_id = pta.products_text_attributes_id and cbta.session_id = '" . tep_session_id() . "'");
 while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
?>
<tr>
  <td class=main><?php echo $text_attributes['products_text_attributes_name'] . ': </td><td>' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], tep_not_null($text_attributes['products_text_attributes_text']) ? $text_attributes['products_text_attributes_text'] : ''); ?></td>
</tr>
<?php
 }
?>

	</table></td>
  </tr>

<!-- eof denuz products text attributes -->

 

Am I missing something?

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I have just installed your version

 

The sql does not seem to allow you you specify the type of input, text box radio button etc

 

and the input box doesn't appear on the product info page

 

Am I missing something?

This contribution is only meant as a quick way to add a text option. It doesn't allow for radio buttons. If the box isn't showing on the product page, it might be that you have declared a text attribute and assigned it to a product in admin.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

 

Many thanks for your updates to Imprint Text Options!

 

Do think it would be difficult to add a Comments text area field for each product, using Imprint Text Options as a starting point? I installed Product Attributes - Option Type Feature, but it does not work well for me and is overkill for my needs.

 

Kind regards,

Eric_K

Link to comment
Share on other sites

If you want it for each product, then you should be able to use it as it is. Just create a text attribute in admin and name it accordingly. I think that should do what you want.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

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