Advertisement:

Author Topic: How to display seller name?  (Read 3287 times)

rashidjaved

  • Newbie
  • *
  • Posts: 12
How to display seller name?
« on: July 02, 2014, 05:59:27 pm »
Hi Friends,

I am using Repurpose theme for OSClass. I want to display seller name on posted ad.
But I didn't find any solution. Is there any php code or plugin to do it?

Here are the links of pages where I want to display the name.

Category Page:
http://www.postad.com.pk/index.php?page=search&sCategory=10

Ad Page:
http://www.postad.com.pk/index.php?page=item&id=9
« Last Edit: July 02, 2014, 07:18:12 pm by rashidjaved »

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to display seller name?
« Reply #1 on: July 02, 2014, 06:12:08 pm »
osc_item_contact_name()

example <p> <? osc_item_contact_name() ; ?></p>

rashidjaved

  • Newbie
  • *
  • Posts: 12
Re: How to display seller name?
« Reply #2 on: July 03, 2014, 08:42:03 am »
Thanks, it worked.

I had to include echo in your code. The working code is:
<?php echo osc_item_contact_name() ; ?>

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: How to display seller name?
« Reply #3 on: July 03, 2014, 10:30:47 am »
@design
Do you use short php tags <?, ?> instead of long one <?php, ?> ?
I was using this some time ago but got into trouble since it's incompatibility with old php version :(

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to display seller name?
« Reply #4 on: July 03, 2014, 06:45:39 pm »
^^ your right <?php.... in this script. they Dev team is teetering on the end closing tag also. if you look at newest WP you'll notice at the end of php pages, they are not being closed anymore

Im still learning, glad you caught the echo.

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: How to display seller name?
« Reply #5 on: July 03, 2014, 11:57:43 pm »
@design
Yes I saw similar on prestashop, that on some pages was php not closed, but I think they had some specialty that auto-close it  ???

rashidjaved

  • Newbie
  • *
  • Posts: 12
Re: How to display seller name?
« Reply #6 on: July 04, 2014, 08:52:52 am »
You are right 'frosticek'. I am not in favor of using such shortcuts because they are not familiar to beginners. Also writing <? rather than <?php creates no difference of time but can create huge confusion for new learners like us. Any how I got great help form the reply. Thanks to 'design'.
« Last Edit: July 04, 2014, 08:57:42 am by rashidjaved »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: How to display seller name?
« Reply #7 on: July 04, 2014, 09:36:55 am »
@rashidjaved
I do not like it too as well, not familiar with that :)

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: How to display seller name?
« Reply #8 on: July 04, 2014, 12:39:19 pm »
Hi,

Using short open tag is a big mistake if you want your code to be used by others. If their php.ini doesn't include short_open_tag = 1, errors will be thrown.

Regards