Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

preorder help??


Graveyard666

Recommended Posts

  • 1 month later...

Hi Jeff

 

I just installed yesterday the preoorder contrieb.

The reason why the box don't show up is the contrieb is not complete yet there is no order in the left or right column to show up a preorder box and even you put some order in column left or right it won't show up, only a big error message.

I looked all over for any solution but looks like there is nobody using this kind of funktion in his store. So we have to wait until somebody comes up with a solution to this contriebution. :(

 

 

Greets

Tsimi

Link to comment
Share on other sites

  • 1 year later...

I have a solution that gets you 50% of the way there...

 

Firstly, three simple things...

 

add - define('BOX_HEADING_PREORDER', 'Pre-Order');

to the catalog/includes/languages/english.php file

 

add - include(DIR_WS_BOXES . 'preorder.php');

to the catalog/includes/column_right.php (or left) file

 

and add - define('FILENAME_PREORDER', 'products_new.php?sql_add=pre');

to the catalog/includes/filenames.php file.

 

Also, in catalog/products_new.php you may have to change the word Preordini to the English, or another language:

echo HEADING_TITLE;

}

if ($sql_add == 'pre')

{

echo Preordini;

 

This gets the infoBox working, but products_new.php is screwy.

 

If you use the original catalog/products_new.php file and find the following section:

 

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 

and replace it with:

 

// added for Preorder contribution

if ($sql_add == 'pre')

{

$sql_add_code ='and p.products_date_available > curdate()';

}

if (empty($sql_add))

{

$sql_add_code ='and p.products_date_available <= curdate() OR p.

 

products_date_available IS NULL';

}

// end of Preorder code

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id " . $sql_add_code . " and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 

 

The link from the top of the preorder box now links to a list of all preorders. Unfortunately, now the listing for new products latches onto one product and displays the price for that alone (at least on my build anyway).

 

See how it goes, I think we're getting closer.

Link to comment
Share on other sites

Update: removing a bit from the query seems to solve the problem. The bit above the query in products_new.php should be:

 

// added for Preorder contribution

if ($sql_add == 'pre')

{

$sql_add_code ='and p.products_date_available > curdate()';

}

if (empty($sql_add))

{

$sql_add_code ='and p.products_date_available < curdate()';

}

// end of Preorder code

 

I've uploaded the full contribution:

Preorder Box

Link to comment
Share on other sites

  • 2 months later...
      echo HEADING_TITLE;

  }

  if ($sql_add == 'pre')

  {

      echo Preordini;

 

Did not get that to work, so I changed it, and got it to work.... even though I'm a total biginner in php ;)

 

<?php

if ($sql_add == 'pre')

{

echo Preorder;

}

else

{

echo HEADING_TITLE;

}

?>

instead of the <?php echo HEADING_TITLE;?> line

 

// Zaxx

Edited by Zaxx
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.
Note: Your post will require moderator approval before it will be visible.

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