Mata Posted May 31, 2007 Share Posted May 31, 2007 Hi! I'm using QT Pro, and what I want to achieve is this: So, that's adding a line break in after the attribute title and I'd also like to reverse the order of the listing (currently it starts with the most recently added item, I'd like to do it the other way around). The code is in product_info.php and I'm pretty sure that the bit we need to look at is this: //++++ QT Pro: Begin Changed code $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); //++++ QT Pro: End Changed Code Unfortunately, I've got no idea what that means. I'm sure adding in a line break and reversing the list order can't be hard. Can anyone help please? Quote Link to comment Share on other sites More sharing options...
mjsmikey Posted June 1, 2007 Share Posted June 1, 2007 (edited) Yeah, I want to know too, PM me when you find, out. I want to add this to another line of PHP code Edited June 1, 2007 by mjsmikey Quote Link to comment Share on other sites More sharing options...
Mata Posted June 2, 2007 Author Share Posted June 2, 2007 Okay, I've got the layout issue sorted at last. The code that generates the output is in includes\classes\pad_base.php . On line 185 (in my code): $out.=' <td class="main" colspan="2"><b>' . TEXT_PRODUCT_OPTIONS . '</b></td>'; delete the 'colspan' bit: $out.=' <td class="main"><b>' . TEXT_PRODUCT_OPTIONS . '</b></td>'; then find the two lines that look a bit like this (lines 216 and 245 in my code): $out .= '<tr><td align="right" class=main><b>' . $stocked['oname'] . ":<br></b></td><td class=main>" . tep_draw_pull_down_menu('id['.$stocked['oid'].']',array_values($stocked['ovals']),$stocked['default']) . "</td></tr>\n"; and add in a new '</tr><tr>' bit in the middle and change the text alignment to left: $out .= '<tr><td align="left" class=main><b>' . $stocked['oname'] . ":<br></b></td></tr><tr><td class=main>" . tep_draw_pull_down_menu('id['.$stocked['oid'].']',array_values($stocked['ovals']),$stocked['default']) . "</td></tr>\n"; Ta-daa! Easy. Now, does anyone fancy telling me how to reverse the sort order of attributes please? Quote Link to comment Share on other sites More sharing options...
trogette Posted June 2, 2007 Share Posted June 2, 2007 you'd have to add a sort-order contribution and work it in with QTPro's selection procedures. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.