Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Imprint Text Options

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
Fixed the product_info.php file.

This is a full package.

Support thread:
http://forums.oscommerce.com/index.php?showtopic=147933&st=0
Fixed mistakes in coding in the following files:

admin/invoice.php
admin/packing_slip.php
checkout_process.php
account_history_info.php

This is a full package.

Support thread:
http://forums.oscommerce.com/index.php?showtopic=147933&st=0
Fixed coding errors in admin/orders.php and product_info.php. See support thread for details.

Support thread:
http://forums.oscommerce.com/index.php?showtopic=147933&st=0
Imprint has had problems keeping track of sessions, i.e. if two users were logged in to the shop and ordering exactly the same product then both would have orders stored in the database with exactly same text. It's because imprint 1.3.1 seems to have problems in getting session ID.

So I have done some modifications to the original imprint 1.3.1 by running diffmerge against my own (already heavily modified) web shop and comparing to OSC22RC1. I gathered all the changes into one document.

I have not tested the changes on an unmodified web shop and I believe there are still some problems to be ironed out as far as product attributes are concerned. I.e. my fix does not work in my web shop on products that do not have separate attributes (like colour or size) with separate stocks kept for them.

If anybody can test my modifications on a standard osCommerce 2.2 and give me some feedback, that would be very appreciated.

Thanks and enjoy!
Hi, everybody!

As I was thinking of using the imprint option quite extensively in my site I did also some checking of the tables and code supporting the option. I have discovered a serious flaw in the option that MIGHT create unpredicted results in your site.

As far as I understand - guests get their basket contents stored in a cookie, while the text attributes get stored in a table that is connected to the guest's session via the session ID. The problem is that the application never gets the session ID and thus it stores an empty value (null?) in the underlying table.

For those who want the above gibberish translated into English: if you have TWO non-registered guests on you site SIMULTANEOUSLY and they order exactly the same item, but with different texts, they will both get THE SAME TEXT. I believe it will be the last input text that "wins".

I have produced a fix that I am testing right now at my own site. The fix involves getting the session ID into $osCsid from $_REQUEST["osCsid"] or from $_GET["osCsid"], depending on where in the php code you are. My fix seems to work, but I don't really know if it's done the correct way as I don't know a jacksh.t about PHP/MySQL programming and was just trying to make a crude fix to a serious problem. Anyway, I'll post the fix in a few days and will be glad if somebody can review it.

Example of one of the fixes in application_top.php:
$osCsid = $_REQUEST["osCsid"];
tep_db_query("insert into zjsess(sessid, place) values ('" . $osCsid . "','application_top 3 (insert)')");
tep_db_query("insert into customers_basket_text_attributes values ('$osCsid', " . $HTTP_POST_VARS['products_id'] . ", " . $attr['products_text_attributes_id'] . ", '" . addslashes($HTTP_POST_VARS['products_text_attributes_' . $attr['products_text_attributes_id']]) . "');");
Primeiramente gostaria de agradecer o DENUZ e todos que ajudaram a desenvolver essa maravilhosa contribuição
que me ajudou muito na hora que eu mais precisava!

Em 2º Lugar: Gostaria de Agradecer a Adriana, que posto no fórum o link dessa contribuição, bj para ela :)

Bom, agora vou postar aqui uma coisa que não consegui fazer com as contribuições, que é mostrar o
"Imprint Text Options" na Página account_history_info.php.

ATENÇÃO BACKUP ANTES MODIFICAR! :)


1º INÍCIO (START)
Abra o Arquivo "account_history_info.php"

Procure pelo código:

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr>' . "n" .
' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "n" .
' <td class="main" valign="top">' . $order->products[$i]['name'];

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
}
}

2º FIM (END)
Substitua (Replace) por esse código.

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr>' . "n" .
' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "n" .
' <td class="main" valign="top">' . $order->products[$i]['name'];

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
}
}



// denuz text attr

$attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['order_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id");
while ($attr = tep_db_fetch_array($attr_q)) {
echo '<br><nobr><small> <i> - ' . $attr['products_text_attributes_name'] . ': ' . stripslashes($attr['products_text_attributes_text']);
echo '</i></small></nobr>';
}

// eof denuz text attr
// Jeferson Ivo - Brasil 05/02/2009 ##ÓD##
   Posted on: 02/05/2009     See contribution details Request Installation with Paid service