Добрый день. подскажите пожалуйста как можно изменить страницу /cart в ubercart?
мне необходимо добавить вывод еще нескольких полей товаров.
Буду очень благодарен за помощь.
уже перерыл весь нет. не нашел то что нужно.
Все же надеюсь на вашу помощь. нужно вывести SKU товара. это нашел я нашел. сделал через модуль:
<?php function custom_cart_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'uc_cart_view_form') { $form['items']['#columns']['image']['access'] = true; //Now I am moving around the columns by adjusting the weight $form['items']['#columns']['model']['weight'] = 0; $form['items']['#columns']['desc']['weight'] = 1; $form['items']['#columns']['qty']['weight'] = 2; $form['items']['#columns']['total']['weight'] = 3; $form['items']['#columns']['remove']['weight'] = 4;
//There are 6 fields in this array other than the cart items, so I loop through and don't account for those 6... haha elegant! for($i=0;$i<count($form['items'])-6;$i++){ //So... I don't know if there's another way to get the info from the node other than using node_load but since it comes from cache it's fast right?
$form['items'][$i]['model']['#value'] = node_load($form['items'][$i]['nid']['#value'])->model; }
} }
?>
а вот еще нужно показать рядом с полем title товара термин словаря, которому он принадлежит. Как это сделать не пойму.
HELP!
решил через views и cart.tpl правда пришлось мутить с css, но в целом пойдет. Решение проблемы писать тут не буду, т.к. нет времени. куму будет необходимо пишите в личку.
Комментарии
уже перерыл весь нет. не нашел то что нужно.
Все же надеюсь на вашу помощь. нужно вывести SKU товара. это нашел я нашел. сделал через модуль:
<?php
function custom_cart_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'uc_cart_view_form') {
$form['items']['#columns']['image']['access'] = true;
//Now I am moving around the columns by adjusting the weight
$form['items']['#columns']['model']['weight'] = 0;
$form['items']['#columns']['desc']['weight'] = 1;
$form['items']['#columns']['qty']['weight'] = 2;
$form['items']['#columns']['total']['weight'] = 3;
$form['items']['#columns']['remove']['weight'] = 4; //There are 6 fields in this array other than the cart items, so I loop through and don't account for those 6... haha elegant!
for($i=0;$i<count($form['items'])-6;$i++){
//So... I don't know if there's another way to get the info from the node other than using node_load but since it comes from cache it's fast right? $form['items'][$i]['model']['#value'] = node_load($form['items'][$i]['nid']['#value'])->model;
}
}
?>}
а вот еще нужно показать рядом с полем title товара термин словаря, которому он принадлежит. Как это сделать не пойму.
HELP!
решил через views и cart.tpl правда пришлось мутить с css, но в целом пойдет. Решение проблемы писать тут не буду, т.к. нет времени. куму будет необходимо пишите в личку.