Jump to content

How to use supplier address in blocksuppliers.tpl


Sparhawke
 Share

Recommended Posts

Hi everyone,

 

I'm creating shop on presta and have rather strange problem. When viewing a product i need to display in left-side column only suppliers that are connected with currently viewed product's manufacturer (currently it displays every supplier added to shop).

 

Since I'm not using supplier address field I've decided to enter there the name of manufacturer of products that given supplier supplies. Then blocksuppliers could hypothetically check if this 'address' is equal to current product manufacturer and display only those suppliers that are.

 

I have problem with accessing supplier address (and actually probably current product manufacturer too but i didnt get there yet) in blocksuppliers.tpl and I'm not fluent with smarty and php to find out how and where to implement it so i can make an 'if' statement before suppliers are displayed.

 

I've managed to access supplier description without problem and tried to use that field but presta automatically adds paragraphs ('<p>' and '</p>') to it so it cannot be compared straight up with product manufacturer. And I would also prefer to use description to main purposes.

 

I would appreciate any help and hints on where to go with that. Thanks!

Edited by Sparhawke (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More