Jump to content



Photo
* * * * * 2 votes

[Contribution] Option Types v2


  • Please log in to reply
934 replies to this topic

#41   kenz

kenz
  • Members
  • 157 posts
  • Real Name:kensley

Posted 07 July 2009 - 16:18

Zappo i see what you mean. but when you extract the pacakage with winzip onto a desktop, it only shows the following folders...

admin
includes
images

and the following files...

checkout_confirmation.php
product_info.php
stylesheet.css
account_history_info.php
checkout_process.php
shopping_cart.php


I had to literately drag the sql file out of the winzip gui and drag it to my desktop

-kenz



I got it working - very nice contribution zappo. By any chance. do you know if this works with "Easy Populate & Products Attributes" contribution

thanks again
kenz

#42   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 07 July 2009 - 19:15

I got it working - very nice contribution zappo. By any chance. do you know if this works with "Easy Populate & Products Attributes" contribution

No idea, but as it seems to involve products attributes, it'll probably have to be merged in some files.
Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------

#43   Able

Able
  • Members
  • 1 posts
  • Real Name:Able

Posted 09 July 2009 - 03:43

No idea, but as it seems to involve products attributes, it'll probably have to be merged in some files.

Hello Can Someone assist me with getting this addon to work, I'm getting all kinds of erro messages when trying to access my admin page since the upload. This is the Error messages:
Warning: require(includes/classes/boxes.php) [function.require]: failed to open stream: No such file or directory in /home/sashalac/public_html/shop/admin/includes/application_top.php on line 316

Warning: require(includes/classes/boxes.php) [function.require]: failed to open stream: No such file or directory in /home/sashalac/public_html/shop/admin/includes/application_top.php on line 316

Fatal error: require() [function.require]: Failed opening required 'includes/classes/boxes.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sashalac/public_html/shop/admin/includes/application_top.php on line 316

Help please I'm a newbie.

Thanks in advance
Able

#44   germ

germ
  • Members
  • 13,921 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 09 July 2009 - 03:59

I'm guessing you copied your /catalog/includes/application_top.php into /admin/includes.

They aren't interchangable.
/blush.gif' class='bbc_emoticon' alt=':blush:' />

I have all v2 versions of osC and the admin uses /includes/classes/box.php on every one.

Copy the correct application_top.php to your admin.

Edited by germ, 09 July 2009 - 04:05.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#45   Terrible Terry

Terrible Terry
  • Members
  • 104 posts
  • Real Name:Terry

Posted 12 July 2009 - 16:20

Please post questions, comments, request, etc. right here!

Is it possible for the previous uploaded files to have the names listed with radio buttons instead of a drop down select menu?
I have tried but to no avail
Thanks for any help in this.
Listen Everyone!
Just be Calm,  Cooperate and this will all be over in a minute

#46   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 13 July 2009 - 14:53

Is it possible for the previous uploaded files to have the names listed with radio buttons instead of a drop down select menu?
I have tried but to no avail
Thanks for any help in this.

It is possible...
I don't think it's very pretty, as when the customer uploads a lot of files, the list get's quite long...

Anyway... Here goes...
In the file catalog/includes/option_types.php Replace this:
while ($uploaded_files = tep_db_fetch_array($uploaded_files_query)) {  $uploaded_array[] = array('id' => $uploaded_files['files_uploaded_name'], 'text' => $uploaded_files['files_uploaded_name'] . ($tmp_html_price ? ' - ' . $tmp_html_price : ''));  $old_uploads = true;}$tmp_html = '<input type="file" name="id[' . TEXT_PREFIX . $ProdOpt_ID . ']">' .         // File field with new upload   tep_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $ProdOpt_ID);    // Hidden field with number of this upload (for this product)$tmp_html .= $tmp_html_price;if ($old_uploads == true) $tmp_html .= '<br>' . tep_draw_pull_down_menu(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $uploaded_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$ProdOpt_ID]);
With this:

That should do the trick...

Edited by Zappo, 13 July 2009 - 14:56.

Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------

#47   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 13 July 2009 - 17:35

Is there any documentation for configuring the product attributes and setting up the user upload?

I have a couple of issues with this...

I had to install a contribution that hides the price which is to be determined by the amount selected in the attributes drop down, only whenever I add a quantity along with a price say + £11.0000 in the products attributes as shown in this screenshot...

[img]http://i31.tinypic.com/x6a6g8.jpg[/img]

The drop downs on the actual shop still all show the price for each Quantity as zero still as in this screenshot.

[img]http://i25.tinypic.com/28ldee.jpg[/img]

I have a feeling it's because of the contribution for hiding the price thats conflicting with it but it could also be because I am configuring it wrong.

I also can't for the life of me get the user upload button to appear on the product description/checkout page, all I get instead is a drop down box with the words [USER-INPUT] in it?

It's a real shame because this is exactly what I need and I really need to get it all working properly and I am already 2 weeks behind on the project =/

Hope you can help me out and thanks in advance bud.

Edited by thewebagency, 13 July 2009 - 17:39.


#48   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 13 July 2009 - 18:40

I have a feeling it's because of the contribution for hiding the price thats conflicting with it but it could also be because I am configuring it wrong.
I also can't for the life of me get the user upload button to appear on the product description/checkout page, all I get instead is a drop down box with the words [USER-INPUT] in it?

I too have a feeling that both these problems are because of a conflict between contributions...
Could you as a start show me the code from product_info.php, where the dropdowns are made?
Can't troubleshoot without more info...
Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------

#49   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 13 July 2009 - 18:44

I too have a feeling that both these problems are because of a conflict between contributions...
Could you as a start show me the code from product_info.php, where the dropdowns are made?
Can't troubleshoot without more info...


Full Code from product_info.php

<?php/*  $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $  osCommerce, Open Source E-Commerce Solutions  [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]  Copyright © 2003 osCommerce  Released under the GNU General Public License*/  require('includes/application_top.php');  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");  $product_check = tep_db_fetch_array($product_check_query);?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html <?php echo HTML_PARAMS; ?>><head><meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"><title><?php echo TITLE; ?></title><base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"><link rel="stylesheet" type="text/css" href="stylesheet.css"><script language="javascript"><!--function popupWindow(url) {  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')}//--></script></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"><!-- header //--><?php require(DIR_WS_INCLUDES . 'header.php'); ?><!-- header_eof //--><!-- body //--><table border="0" width="100%" cellspacing="3" cellpadding="3">  <tr>    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"><!-- left_navigation //--><?php require(DIR_WS_INCLUDES . 'column_left.php'); ?><!-- left_navigation_eof //-->    </table></td><!-- body_text //-->    <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"><?php  if ($product_check['total'] < 1) {?>      <tr>        <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>      </tr>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr>      <tr>        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">          <tr class="infoBoxContents">            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">              <tr>                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>                <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>              </tr>            </table></td>          </tr>        </table></td>      </tr><?php  } else {    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");    $product_info = tep_db_fetch_array($product_info_query);    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {      $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';    } else {      $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));    }    if (tep_not_null($product_info['products_model'])) {      $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';    } else {      $products_name = $product_info['products_name'];    }?>      <tr>        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">          <tr>            <td class="pageHeading" valign="top"><?php echo $products_name; ?></td><!-- start Remove Prices and buy now and add to cart if price = 0.00 V2            <td class="pageHeading" align="right" valign="top"><?php // echo $products_price; ?></td>-->            <td class="pageHeading" align="right" valign="top"><?php if ($product_info['products_price'] < 0.01){} else {echo $products_price; }?></td><!-- end Remove Prices and buy now and add to cart if price = 0.00 V2 -->          </tr>        </table></td>      </tr>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr>      <tr>        <td class="main"><?php    if (tep_not_null($product_info['products_image'])) {?>          <table border="0" cellspacing="0" cellpadding="2" align="right">            <tr>              <td align="center" class="smallText"><script language="javascript"><!--document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');//--></script><noscript><?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?></noscript>              </td>            </tr>          </table><?php    }?>          <p><?php echo stripslashes($product_info['products_description']); ?></p><?php    $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) {?>          <table border="0" cellspacing="0" cellpadding="2">            <tr>              <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>            </tr><?php      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name 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 . "' order by popt.products_options_name");      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {        $products_options_array = array();        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");        while ($products_options = tep_db_fetch_array($products_options_query)) {          $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);          if ($products_options['options_values_price'] != '0') {            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';          }        }        if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {          $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];        } else {          $selected_attribute = false;        }?>            <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><?php      }?>          </table><?php    }?>        </td>      </tr>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr><?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) {?>      <tr>        <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>      </tr>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr><?php    }    if (tep_not_null($product_info['products_url'])) {?>      <tr>        <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>      </tr>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr><?php    }    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {?>      <tr>        <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>      </tr><?php    } else {?>      <tr>        <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>      </tr><?php    }?>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr>      <tr>        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">          <tr class="infoBoxContents">            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">              <tr>                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>                <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td><?php /* start Remove Prices and buy now and add to cart if price = 0.00 V2                <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>*/ ?><td class="main" align="right"><?php if ($product_info['products_price'] < 0.01){//echo 'Please Phone To Buy';echo 'Click Link Above to Buy';} else {echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); }?></td><?php // end Remove Prices and buy now and add to cart if price = 0.00 V2 ?>                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>              </tr>            </table></td>          </tr>        </table></td>      </tr>      <tr>        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>      </tr>      <tr>        <td><?php    if ((USE_CACHE == 'true') && empty($SID)) {      echo tep_cache_also_purchased(3600);    } else {      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);    }  }?>        </td>      </tr>    </table></form></td><!-- body_text_eof //-->    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"><!-- right_navigation //--><?php require(DIR_WS_INCLUDES . 'column_right.php'); ?><!-- right_navigation_eof //-->    </table></td>  </tr></table><!-- body_eof //--><!-- footer //--><?php require(DIR_WS_INCLUDES . 'footer.php'); ?><!-- footer_eof //--><br></body></html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


#50   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 13 July 2009 - 18:50

I Have just checked and both plugins include a product_info.php file, obviously one has overwritten the other, if you could point me in the right direction as to what piece of your code I can inject into my current product_info.php file as I'm pretty much a noob when it comes to PHP I would be eternally gratefull, either that or if you could recommend a good app to compare the code of both files as I have a funny feeling there may be more files that need to be modded.

Edit: Actually it looks like this is the only file that crosses over which is good news.

Edited by thewebagency, 13 July 2009 - 18:53.


#51   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 13 July 2009 - 20:17

OK I went through and compared the code to both and most of it sat in between the current code nicely, there was just one part with similar coding that I'm not sure how to approach.

In your code it has this....

[codebox] <td class="main"><?php echo $ProdOpt_Name . ':'; ?></td>
<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $ProdOpt_ID . ']', $products_options_array, $selected_attribute) . ' &nbsp; ' . $ProdOpt_Comment; ?></td>
</tr><?php
} // End if Default=true
//EOF - Zappo - Option Types v2 - Add extra Option Values to Query && Placed Options in new file: option_types.php[/codebox]

In the Plugin Code for removing the zero price it has this...

[codebox] <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>
<?php[/codebox]

And I'm not sure which parts I can add in or take out and still have both contributions working correctly?

Edited by thewebagency, 13 July 2009 - 20:19.


#52   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 13 July 2009 - 20:47

p.s I tried leaving those lines of code alone in the file and I managed to get the File uploader to show correctly though I dont know if it works as of yet, however the prices are still showing as (+0) on the dropdowns for the price attributes.

#53   kenz

kenz
  • Members
  • 157 posts
  • Real Name:kensley

Posted 13 July 2009 - 20:50

No idea, but as it seems to involve products attributes, it'll probably have to be merged in some files.



Just to give a heads up. I tried to make an attempt at combining the Options Types v2 contribution with Easy Populate and Editor Order. I installed the NoAttribManager folder for Option Types v2. I tried testing out the ability to adjust or add options on the order.php (Editor Order page) in the admin. But whenever I tried to add a product from the Editor Order page, it didnt add the product to the order and there are "0"'s attached to every product item name when trying to add products to the current product order.

kenz

Edited by kenz, 13 July 2009 - 20:52.


#54   ossum

ossum
  • Members
  • 8 posts
  • Real Name:Jacob Schmid
  • Gender:Male
  • Location:Oregon, USA

Posted 14 July 2009 - 01:55

First, I would like to thank you for this contribution, it is exactly what I needed for my site. Now I have it installed and working, there are just a few things I'm not clear on. Is there a way to configure the text box entry to add a price, say, by the letter? I wonder if this is possible to set as an option/value price, I couldn't figure out how to implement such a thing.

Thanks for your gracious work!

#55   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 14 July 2009 - 10:30

Is there a way to configure the text box entry to add a price, say, by the letter?

That's currently not possible....
As the Prices for Attributes are set per Product/Option combination, it's also not very easy to implement...
Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------

#56   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 14 July 2009 - 10:41

however the prices are still showing as (+0) on the dropdowns for the price attributes.

The code you posted is not where the problem is...
I have no idea what that "Hiding the Price" contribution does, but if the price is '0', it's automatically hidden by OptionTypes v2...
The contribution probably changes the way 'options_values_price' is handled or something...

You'll have to look at the lines in product_info.php and includes/modules/option_types.php where the prices are collected:
if ($products_options['options_values_price'] != '0')
AND
if ($products_attribs_array['options_values_price'] != '0')
Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------

#57   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 14 July 2009 - 12:32

The code you posted is not where the problem is...
I have no idea what that "Hiding the Price" contribution does, but if the price is '0', it's automatically hidden by OptionTypes v2...
The contribution probably changes the way 'options_values_price' is handled or something...

You'll have to look at the lines in product_info.php and includes/modules/option_types.php where the prices are collected:
if ($products_options['options_values_price'] != '0')
AND
if ($products_attribs_array['options_values_price'] != '0')


OK Well I rebuilt the shop from scratch and installed STS along with option types v2 and left out the hide price contribution, all is working well now after a bit of light editing on one file, only now I have the prices showing again as £0.00! How do I set up option types v2 to hide this because like you said it doesnt appear to hide it automatically at all?

Thanks in advance.

Edited by thewebagency, 14 July 2009 - 12:35.


#58   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 14 July 2009 - 12:42

only now I have the prices showing again as £0.00! How do I set up option types v2 to hide this because as you say it doesnt appear to hide it automatically?

The lines I previously posted normally make sure the price is hidden: (IF 'options_values_price' IS NOT '0' --> Display price)
Something seems to be going wrong there...
As I do not know what changes are made by STS, I can't exactly say what the problem is...
Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------

#59   thewebagency

thewebagency
  • Members
  • 18 posts
  • Real Name:Dan
  • Gender:Male
  • Location:UK

Posted 14 July 2009 - 12:50

There where no other changes or overwritten files between STS and option types v2. The only thing I had to do was to add a few lines to the bottom of application_top.php to make STS work properly, code below.

[codebox]// add the products model to the breadcrumb trail
if (isset($HTTP_GET_VARS['products_id'])) {
$model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
if (tep_db_num_rows($model_query)) {
$model = tep_db_fetch_array($model_query);
$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));
}
}

//BOF - Zappo - Option Types v2 - ONE LINE - message stack moved up from here...
// START STS 4.5.8
require (DIR_WS_CLASSES.'sts.php');
$sts= new sts();
$sts->start_capture();
// END STS 4.5.8[/codebox]

#60   Zappo

Zappo
  • Members
  • 201 posts
  • Real Name:Albert van Osch
  • Gender:Male
  • Location:the Netherlands, Asten

Posted 14 July 2009 - 13:21

The only thing I had to do was to add a few lines to the bottom of application_top.php to make STS work properly, code below.

That doesn't help much. The following line:
require (DIR_WS_CLASSES.'sts.php');
means the file sts.php gets processed at that point... What that file actually does is the question...

This looks more like a problem with STS than with Option Types v2.
I suggest you look for help there, as Option Types v2 uses STANDARD osCommerce behavior when it comes to Attribute's prices...
Seems to me, STS is the "conflicting" contribution here...
Check out my website! shop.crystalcopy.nl


Like Eek said... It never hurts to help!
----------------------------------------