0
votes

I have used drupal 7.38.

My question is I have created a view for product stock.

In this view I have used the table structure. When stock is empty then mail go to the stock manager.

In mail the product display in p tag but I want to show in table format show how can I do this?

I have some change on the views-view-table--stocks.tpl.php and views-view.tpl.php.

1
What is sending the email ? Rules ? Do you use Commerce Stock module ? Commerce Stock Notification ? If the email is sent by a rule, you can modify its template by editing this rule, see "Action" -> "Send email" for the rule. - Florian Motteau
I have created a custom rules component for stock notification.when stock is empty then rules is send the mail to the stock manager. In views I have selected table format but in mail table border not display, in rules component body I have written like this ` <p>Hi Rahul,</p> <br /> <p>Please check stocks level given below</p> <br /> <p><?php print views_embed_view('stocks', 'block_1');?></p>` when I use here table then also table display without border. - priyank

1 Answers

0
votes

In your email body you could add a element :

<style>
  .views-table-class { border: 1px solid black }
</style>

I guess you can add a CSS class ("views-table-class") to the table in Views interface. If not, using chrome dev tools / firebug you should be able to find a CSS selector to reach the table.

More info on CSS borders here. You can also add your CSS class on the table with your .tpl file like explained here.

Hope it helps !