Advertisement:

Author Topic: how to move select the condition of the item to the field position in item-post?  (Read 259 times)

Valdo

  • Newbie
  • *
  • Posts: 15
Hello, all,

how to move the position of the field select the condition item to the field choose price and I want to delete choose free and check with the seller at item-post.php
Here I use the veronika theme
I searched everywhere but couldn't find it.

and how do you make it?

Like the picture below

Thank you for your help
« Last Edit: May 02, 2019, 09:02:14 pm by Rivaldo »

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Hello,

Check item.php and eventually functions.php, we don't have access to premium themes (unless we buy them).

Regards.

Valdo

  • Newbie
  • *
  • Posts: 15
Hallo @patrickFromCroatia

At item.php which line will I change the code and in function.php

Can you help me?

item.php
Code: [Select]
<?php 
    
if(osc_item_price() == '') {
      
$og_price __('Check with seller''veronika');
    } else if(
osc_item_price() == 0) {
      
$og_price __('Free''veronika');
    } else {
      
$og_price osc_item_price(); 
    }
  
?>

Function.php
Code: [Select]
$html  = '<div class="simple-price-type simple-select">';
  $html .= '<span class="text round3 tr1"><span>' . $default_name . '</span> <i class="fa fa-angle-down"></i></span>';
  $html .= '<div class="list">';
  $html .= '<div class="option info">' . __('Choose price type', 'veronika') . '</div>';

  $html .= '<div class="option' . ($default_key == 0 ? ' selected' : '') . '" data-id="0"><i class="fa fa-pencil help"></i> ' . __('Enter price', 'veronika') . '</span></div>';
  $html .= '<div class="option' . ($default_key == 1 ? ' selected' : '') . '" data-id="1"><i class="fa fa-cut help"></i> ' . __('Free', 'veronika') . '</span></div>';
  $html .= '<div class="option' . ($default_key == 2 ? ' selected' : '') . '" data-id="2"><i class="fa fa-phone help"></i> ' . __('Check with seller', 'veronika') . '</span></div>';
« Last Edit: May 03, 2019, 08:06:48 am by Rivaldo »

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Sorry, it's item-post.php and item-edit.php.
Found the theme in the meanwhile...

Try moving this:

Code: [Select]
          <div class="condition">
            <label for="sCondition"><?php _e('Condition''veronika'); ?></label>
            <?php echo veronika_simple_condition(); ?>
          </div>

after this:

Code: [Select]
              <div class="selection">
                <?php echo veronika_simple_price_type(); ?>
              </div>
            </div>

Regards.

Valdo

  • Newbie
  • *
  • Posts: 15
Hello patrick

I tried it and it didn't work and the style was messy like in the picture, can you help me, I will send this theme file ... Thank you for explaining to me

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
You need to play a little bit with positioning and CSS to make it better.

Putting condition code after <div class="inside">...</div> and adding this CSS makes it a little better.

Code: [Select]
.condition {
    float: left;
    width: 50%;
    clear: both;
    padding: 0 0 5px 0;
    background: #fcfcfc;
    border-bottom: 1px solid #f8f8f8;
    margin: 20px;
}

Regards.

Valdo

  • Newbie
  • *
  • Posts: 15
Thank you for the help of @patrick

All works well,
I am a junior developer, I will learn more from this osclass forum

You are the best

Forgive my bad english
Regards :)

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
No problem. Good luck with learning, pretty much all I learned about Osclass was on this forums! :)

Regards.