Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Add Product


empo

Recommended Posts

2->tfr

-Description product HTML -> you can do it by your self

-Email with the customer sold product seller. -> what you mean by this?

-To add modalites of payment to the product -> modalites??

Link to comment
Share on other sites

  • 4 weeks later...

Hi folks!

 

I have the same problem like p_angel0!

 

The Problem may cause of the .htaccess protection and the connection between the catalog/account_add.php an the admin/customers.php, i think.

 

Because of the folling instructions:

8.

?  ## Open file: admin/customers.php? at line :30

?  ## Add code :

? ? ? ? ? ? ?  $customers_app = tep_db_prepare_input($HTTP_POST_VARS['customers_app']);

 

9. ## Open file: admin/customers.php? at line :158(end)

?  ## Add code :

? ? ? ? ? ? ?  'customers_ap' => $customers_app,

 

10.

?  ## Open file: admin/customers.php? at line :225(after "select c.customers_id,")

?  ## Add code :

? ? ? ? ? ? ? ? c.customers_ap,

11.

?  ## Open file: admin/customers.php? at line :468(end)

?  ## Add code :

? ? ? ? ? ? ? <?? require('customers_app.inc.php');?>

 

12.

? ?  ## Open file: admin/includes/languages/customers.php? at line :468(end)

? ?  ## Add code :

? ? ? ? ? ? ? define('CATEGORY_CUSTOMER_APP', 'Approve Customer');

? ? ? ? ? ? ? define('ENTRY_CUSTOMER_APP', 'Approve customer');

? ? ? ? ? ? ? define('YES', 'Yes');

? ? ? ? ? ? ? define('NO', 'No');

 

Please correct me, if i am wrong!

Edited by dhotter
Link to comment
Share on other sites

I'm also getting the same login screen for the "Manage my products" page.

 

I also was wondering if there is anyway to code the "account_add.php" page to display the full size of the image without making any unnecessary adjustments to the sizes of the other page header images?

Link to comment
Share on other sites

I also wanted to know if there were any release before the advanced customer add product page. Basically I just want them to just add the product name, description, and upload the photo. I have 1.13 and it has this but I would like to also wave the contribution updated minus the bugs and security risks.

Link to comment
Share on other sites

@empo:

It's a really great contribution!

 

I've 3 questions/ suggestions for your Contrib:

 

1. Would it be possible to inform the user who added the product, if this added product was selled?

 

2. The form with the details the user should add, with a form-check, if everything is filled in?

 

3. The Admin-Section should have a box or information, in which category the new Product is set. Or the Mail should have the hole category with sub-categories

 

That would be very nice.

 

Thanks from Dan!

Link to comment
Share on other sites

Hi there,

 

I am new to oscommerce. I have installed and it is surely a good software. About customer add product features, I have a problem implement it.

 

When I click on MyAccount > Add Products >, I cant preview the products. The page link is blank. But when I click enter again at the URL then I got the following messages:

 

Warning: reset(): Passed variable is not an array or object in c:\program files\apache group\apache\htdocs\sugarcrm\shopcart\oscommerce-2.2ms2\catalog\includes\classes\product_manage.php on line 117

 

Warning: Variable passed to each() is not an array or object in c:\program files\apache group\apache\htdocs\sugarcrm\shopcart\oscommerce-2.2ms2\catalog\includes\classes\product_manage.php on line 118

 

Then when I click on the insert button, i got the following messages:

 

Warning: mail(): SMTP server response: 504 <root@localhost>: Recipient address rejected: need fully-qualified address in c:\program files\apache group\apache\htdocs\sugarcrm\shopcart\oscommerce-2.2ms2\catalog\includes\classes\email.php on line 502

 

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\sugarcrm\shopcart\oscommerce-2.2ms2\catalog\includes\classes\email.php:502) in c:\program files\apache group\apache\htdocs\sugarcrm\shopcart\oscommerce-2.2ms2\catalog\includes\functions\general.php on line 29

 

Please help, Thanks in advance.

Link to comment
Share on other sites

  • 2 weeks later...

sllc-> mail warning because you running system on windows without any smtp server or your php not configures properly.

reset warning probably come from code mistake but by default warnings are disabled...

Link to comment
Share on other sites

Hi folks!

 

I have the same problem like p_angel0!

 

The Problem may cause of the .htaccess protection and the connection between the catalog/account_add.php an the admin/customers.php, i think.

 

Because of the folling instructions:

Please correct me, if i am wrong!

 

So where was a problem??

Link to comment
Share on other sites

@empo:

 

I also was wondering if there is anyway to code the "account_add.php" page to display the full size of the image without making any unnecessary adjustments to the sizes of the other page header images?

 

I also wanted to know if there were any release before the advanced customer add product page. Basically I just want them to just add the product name, description, and upload the photo. I have 1.13 and it has this but I would like to also wave the contribution updated minus the bugs and security risks.

Link to comment
Share on other sites

sllc-> mail warning because you running system on windows without any smtp server or your php not configures properly.

reset warning probably come from code mistake but by default warnings are disabled...

 

I have managed to configure it. If you are running the system on windowsa, makes changes in php.ini. Search the smtp configuration, therefore add-in addtional smtp server URL.

 

thanks

Link to comment
Share on other sites

I have a t-shirt shop and I'd like for people (customers) to be able to upload pictures of themselves in our tees. I don't really want these items to be available in our catalog so I'm not sure this contribution will work for me without significant work.

 

What do Empo and the other ingenius folk on this board think? Could it be easily adapted? Is there another contribution that allows me to allow customers to upload a file to a blog or discussion group inside osc?

 

thanks!

Link to comment
Share on other sites

empo, I understand you can't make individual mods, but what about my question:

 

"I also wanted to know if there were any release before the advanced customer add product page. Basically I just want them to just add the product name, description, and upload the photo. I have 1.13 and it has this but I would like to also wave the contribution updated minus the bugs and security risks. "

 

I just want to know what the last release was that didn't include the advanced features/controls for the client add a product page. If there was one or if you have any suggestions that would be cool too.

 

Thanks for your help.

Link to comment
Share on other sites

to wayoutpost->no you need another contribution ( i did something similar once and this was for postcards-> user able to add his image to any postcard, but this contributon was for comercial use only)

 

to zpeedfreak->can`t understand what you want

Link to comment
Share on other sites

Currently in this contribution, customer cant able to delete their upload product and every upload product need to be approve by admin before they can purchase or sell online.

 

I am wondering how to disable the approve feature by admin and how customer can delete their upload product?

 

Thanks Empo. You done a great contributions.

Link to comment
Share on other sites

@empo

 

Is it possible to set an new customer to the approved status even when his account is created? I don't want to approve every new customer in the admin.

 

An the second question I have: Would it be possible, to send an email to the customer, if his product is sold?

 

Thanx for your help!

 

Greeting,

Daniel

Link to comment
Share on other sites

Uh, I have a problem with the form-check in customer_add.php:

 

The form won't be checked if the fields are filled out.

 

Is there any mistake?

 

Code:

 

<?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . '  <a href="' . tep_href_link('account_add.php', 'osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?>

 

An the code of the sending:

 

if ($action == 'new_product_preview') {
  if (tep_not_null($HTTP_POST_VARS)) 
{
    $pInfo = new objectInfo($HTTP_POST_VARS);
    $products_name = $HTTP_POST_VARS['products_name'];
    $products_description = $HTTP_POST_VARS['products_description'];
    $products_url = $HTTP_POST_VARS['products_url'];
  } 
else 
{
    $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
    $product = tep_db_fetch_array($product_query);

    $pInfo = new objectInfo($product);
    $products_image_name = $pInfo->products_image;
  }

  $form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product';

  echo tep_draw_form($form_action, 'account_add.php?osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');

  $languages = tep_get_languages();
  for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
    if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {
      $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']);
      $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']);
      $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']);
    } else {
      $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);
      $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);
      $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);
    }
?>

 

Thanx for your help, again!

Daniel

Link to comment
Share on other sites

@empo

 

Is it possible to set an new customer to the approved status even when his account is created? I don't want to approve every new customer in the admin.

 

An the second question I have: Would it be possible, to send an email to the customer, if his product is sold?

 

Thanx for your help!

 

Greeting,

Daniel

 

1) yes it`s possible simply configure mysql query for this row ( by default it`s always 0 for new customer)

 

2) yes of course but i need to add this feature...

 

3) about code it`s hard to find from where mistake comming try to check javascript code

Link to comment
Share on other sites

@empo

 

Well, I tried to code a function in order to inform the customer, if his account is approved.

 

I modified the admin/customers_app.inc.php in this way:

 

  <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
     </tr>
     <tr>
       <td class="formAreaTitle"><?php echo CATEGORY_CUSTOMER_APP; ?></td>
     </tr>
     <tr>
       <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
         <tr>
           <td class="main"><?php echo ENTRY_CUSTOMER_APP; ?></td>
           <td class="main">
            <?
              echo tep_draw_radio_field('customers_app', '1', false, $cInfo->customers_ap) . '  ' . YES . '  ' . tep_draw_radio_field('customers_app', '0', false, $cInfo->customers_ap) . '  ' . NO;
             // TEST for E-Mail to customer if approved:
 
   define(EMAIL_TEXT_SUBJECT,'New Product was added');
         $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id ."'");
         $category = tep_db_fetch_array($category_query);

         $email =  "Hallo Kunde!";
         $email .= "TEST : ".$category['categories_name']."\n\n";
         $email .= "Testnachricht : ". $customer['customers_firstname'].' '.$customer['customers_lastname'] ."\n\n";
         $email .= "Text 2 \n\n";
         tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, $email,$customer['customers_firstname'].' '.$customer['customers_lastname'],$customer['customers_email_address']);

   //end
     ?>
           </td>
         </tr>
       </table></td>
     </tr>

 

But this mail is only send to admin, instead of sending it to the customer...

 

Do you kno, where my mistake is?

 

And the second: I postet a txt on this following LINK

with my mistake in the customer_add.php:

 

I really don't find it.

 

Thanx for your help!

Greeting,

Daniel

Link to comment
Share on other sites

Currently in this contribution, customer cant able to delete their upload product and every upload product need to be approve by admin before they can purchase or sell online.

 

I am wondering how to disable the approve feature by admin and how customer can delete their upload product?

 

Thanks Empo. You done a great contributions.

 

 

Empo, I hope you can help me. I manage to enable the delete functions but when click on delete confirm, it direct out from the login. Then user need to login again.

 

I am looking at the account_manage.php file. Any ideas how to redirect to already login. Thanks in advance.

Link to comment
Share on other sites

  • 4 weeks later...

@empo

 

Would it be possible, to send the customer-data, who add a product, to the customer who bought the customers product via mail, in the confirmation-email?

 

For example:

If I bought a product a computer from bill gates, i want to submit the personal-data of Bill Gates (eg. Adress, eMail) to me, after the product I bought.

 

You you please tell me, how to include this personal Data to the eMail?

 

Thanx a lot!

 

Greeting from Europe!

Dan

Link to comment
Share on other sites

A little confused.

I have no intalled this yet. From reading the readme file.....

 

How do we access this feature. No directions on how to use just how to install.

Also

I have a HIGHLY modified cart. Can you please indicate the changes you made to osc files in catalog directory.

 

Thanks

q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Link to comment
Share on other sites

  • 3 weeks later...

Hi can any one help me!!!

 

I installed the contribution, but something is not working for me.

 

When i add a product the image has a wrong size (100pxX75px). i like to have the images in the size that they are when they are uploadet.

 

Also i can't put html code in the product description, in the customer add products.

 

Please help me.

 

Best regards

CPIDK :'(

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