Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Really Simple Qt Pro Layout Question: Inserting A Line Break!


Mata

Recommended Posts

Hi!

 

I'm using QT Pro, and what I want to achieve is this:

 

delete-me.gif

 

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?

Link to comment
Share on other sites

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?

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