Changeset a653dec
- Timestamp:
- Dec 2, 2019, 1:53:56 AM (3 years ago)
- Branches:
- master
- Children:
- 5685409
- Parents:
- fd8c1c5 (diff), 7e45ae2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- lazersib <blacklight@…> (02/12/19 01:53:56)
- git-committer:
- GitHub <noreply@…> (02/12/19 01:53:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
web/vitrina.php
rfd8c1c5 ra653dec 1371 1371 $img = ''; 1372 1372 } 1373 $product_data = $this->getProductData($item['id']); 1374 $product_name_html = html_out($product_data['group_printname'] . ' ' . $product_data['name']); 1373 1375 $img = isset($item['img_uri']) ? "<img_src='{$item['img_uri']}' alt='" . html_out($item['name']) . "'>" : ''; 1374 1376 $tmpl->addContent("<tr id='korz_ajax_item_{$item['pos_id']}'{$lock_mark}> … … 1377 1379 <img src='/img/i_del.png' alt='Убрать'></a></span></td> 1378 1380 <td>$img</td> 1379 <td><a href='/vitrina.php?mode=product&p={$item['pos_id']}'>" . html_out($item['name']). "</a></td>1381 <td><a href='/vitrina.php?mode=product&p={$item['pos_id']}'>" . $product_name_html . "</a></td> 1380 1382 <td class='right'{$gray_price}>$price_p</td> 1381 1383 <td class='right'><span class='sum'>$sum_p</span></td> … … 1771 1773 /// Заключительная форма оформления покупки 1772 1774 protected function BuyMakeForm() { 1773 global $tmpl ;1775 global $tmpl, $db; 1774 1776 if (@$_SESSION['uid']) { 1775 1777 $up = getUserProfile($_SESSION['uid']); … … 1841 1843 } 1842 1844 1843 $tmpl->addContent(" 1844 Другая информация:<br> 1845 <textarea name='dop' rows='5' cols='80'>" . html_out(@$up['dop']['dop_info']) . "</textarea><br> 1846 <button type='submit'>Оформить заказ</button> 1847 </div> 1848 </form>"); 1845 $tmpl->addContent("Другая информация:<br><textarea name='dop' rows='5' cols='80'>" . html_out(@$up['dop']['dop_info']) . "</textarea><br>"); 1846 1847 if($this->getBasket()) { 1848 $basket = $this->getBasket(); 1849 $tmpl->addContent('<br> 1850 <table class="list"> 1851 <tbody> 1852 <tr class="title"> 1853 <th width="60%">Наименование</th> 1854 <th width="15%">Цена, руб.</th> 1855 <th width="10%">Количество</th> 1856 <th width="15%">Сумма, руб.</th> 1857 </tr> 1858 '); 1859 foreach ($basket['items'] as $item) { 1860 $product_data = $this->getProductData($item['id']); 1861 $product_name_html = html_out($product_data['group_printname'] . ' ' . $product_data['name']); 1862 $tmpl->addContent(" 1863 <tr> 1864 <td style='text-align: left'><a href='/vitrina.php?mode=product&p={$item['pos_id']}'>{$product_name_html}</a></td> 1865 <td>".number_format($item['price'], 2, ',', ' ')."</td> 1866 <td>{$item['cnt']}</td> 1867 <td style='text-align: right'>".number_format($item['sum'], 2, ',', ' ')."</td> 1868 </tr> 1869 "); 1870 } 1871 1872 $tmpl->addContent(" 1873 <tr> 1874 <td colspan=\"3\">Сумма заказа:</td> 1875 <td style='text-align: right' colspan=\"1\">" . number_format($basket['sum'], 2, ',', ' ') . "</td> 1876 </tr> 1877 "); 1878 1879 if(!empty($_SESSION['basket']['delivery_region']) && !empty($_SESSION['basket']['delivery_type'])) { 1880 $delivery = $_SESSION['basket']['delivery_type']; 1881 $delivery_region = $_SESSION['basket']['delivery_region']; 1882 $res = $db->query("SELECT `name` FROM `delivery_types` WHERE `id`='$delivery'"); 1883 list($d_service_name) = $res->fetch_row(); 1884 $res = $db->query("SELECT `price`, `name` FROM `delivery_regions` WHERE `id`='$delivery_region'"); 1885 list($d_price, $d_region_name) = $res->fetch_row(); 1886 $tmpl->addContent(" 1887 <tr> 1888 <td colspan=\"3\">$d_service_name ($d_region_name):</td> 1889 <td style='text-align: right' colspan=\"1\">".number_format($d_price, 2, ',', ' ')."</td> 1890 </tr> 1891 "); 1892 } 1893 1894 $tmpl->addContent(' 1895 <tr class="total"> 1896 <td colspan="3">Итого:</td> 1897 <td style=\'text-align: right\' colspan="1"> 1898 ' . number_format(($basket['sum'] + (isset($d_price) ? $d_price : 0)), 2, ',', ' ') . ' 1899 </td> 1900 </tr> 1901 </tbody> 1902 </table><br> 1903 '); 1904 } 1905 1906 $tmpl->addContent("<button type='submit'>Оформить заказ</button></div></form>"); 1849 1907 } 1850 1908
Note: See TracChangeset
for help on using the changeset viewer.