- Регистрация
- 20 Ноя 2013
- Сообщения
- 564
- Реакции
- 132
- Автор темы
- Заблокирован
- #1
Еще не нашелся кто сможет занулит этот прелестный модуль
Для просмотра ссылки Войдиили Зарегистрируйся
Для просмотра ссылки Войди
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Для начала указывайте донора, а после уже можно что то говорить! [itemprop=price] это конструкция из микроразметки, и это самое правильное решение для большинства сайтов, так как этим параметром они сами передают настоящую стоимость и для поисковиков и для всякой другой фигни общим.....Добрый день, подскажите как подправить инструкцию.
[PRODUCT]
//AUTO START - сгенерировано автоматически
name = tag_text ".b-title span"
find_manufacturer
price = tag_text ".b-product-cost__old-price"
price=> currency "UAH"
new_price = tag_text "[itemprop=price]"
currency_delimiter = ","
new_price=> currency "UAH"
update_new_price = true
description = tag_html "[itemprop=description]"
model = tag_text ".b-product-data__item_type_sku span"
main_image = inside "t=""https", """"
main_image = "http%main_image"
if (!price and !empty(noprice)) skip = true
//AUTO END
В некоторых товарах есть две цены старая и акция, и вот в инструкции так прописано. А в остальных товарах цена только tag_text "[itemprop=price]" , как прописать условие, что если нет старой цены, чтобы не писало нулевую и рядом акцию, а просто ставило tag_text "[itemprop=price]" . Хух, надеюсь понятно написала)))
Для начала указывайте донора, а после уже можно что то говорить! [itemprop=price] это конструкция из микроразметки, и это самое правильное решение для большинства сайтов, так как этим параметром они сами передают настоящую стоимость и для поисковиков и для всякой другой фигни общим.....
что то не срабатывает, ставит все равно главную ноль, а скидку вторуюif (!price) price = new_price
Ну наверное как то так:донор Для просмотра ссылки Войдиили Зарегистрируйся
[PRODUCT]
//AUTO START - сгенерировано автоматически
name = tag_text ".b-title span"
seo_url = "%name %product_id" -> translit
find_manufacturer
price = inside "ce=""", " " -> replace ",", "."
description = tag_html ".ck-alert_theme_blue"
currency_code = "UAH"
currency_delimiter = ","
//new_price = tag_text "[itemprop=price]"
//new_price => currency currency_code
update_new_price = true
model = tag_text ".b-product-data__item_type_sku span"
manufacturer = tag_text "tr:nth-child(2) .b-product-info__cell:nth-child(2)"
main_image = tag_image "[itemprop=image]" -> replace "https", "http"
images = tags_image "[itemprop=image]" -> replace "https", "http"
attr_heads = insides "l></div><div class=""b-page__row""><div><span class=""b-title"">", "<"
attr_names = tags_text ".b-product-info__cell:nth-child(1)"
attr_values = tags_text ".b-product-info__cell:nth-child(2)"
attributes = pgroup attr_heads, attr_names, attr_values, "Характеристики"
price => currency currency_code
if (!price and !empty(noprice)) skip = true
if (@auto_categorize) categorizer = name . " ". description
//AUTO END
Ну наверное как то так:
Код:[PRODUCT] //AUTO START - сгенерировано автоматически name = tag_text ".b-title span" seo_url = "%name %product_id" -> translit find_manufacturer price = inside "ce=""", " " -> replace ",", "." description = tag_html ".ck-alert_theme_blue" currency_code = "UAH" currency_delimiter = "," //new_price = tag_text "[itemprop=price]" //new_price => currency currency_code update_new_price = true model = tag_text ".b-product-data__item_type_sku span" manufacturer = tag_text "tr:nth-child(2) .b-product-info__cell:nth-child(2)" main_image = tag_image "[itemprop=image]" -> replace "https", "http" images = tags_image "[itemprop=image]" -> replace "https", "http" attr_heads = insides "l></div><div class=""b-page__row""><div><span class=""b-title"">", "<" attr_names = tags_text ".b-product-info__cell:nth-child(1)" attr_values = tags_text ".b-product-info__cell:nth-child(2)" attributes = pgroup attr_heads, attr_names, attr_values, "Характеристики" price => currency currency_code if (!price and !empty(noprice)) skip = true if (@auto_categorize) categorizer = name . " ". description //AUTO END
Если я все правильно понял, то вам нужна именно стоимость товара та которая есть и в товарах где есть скидка брать товар старой цены.
Сорри за задержку с ответом, был занят.спасибо большое почти то ( т.е. основная цена идеально), но как же сделать чтобы там где есть акция она тоже потягивалась а там где нет не создавалась?
[PRODUCT]
//AUTO START - сгенерировано автоматически
name = tag_text ".b-title span"
seo_url = "%name %product_id" -> translit
find_manufacturer
price = inside "ce=""", " " -> replace ",", "."
description = tag_html ".ck-alert_theme_blue"
currency_code = "UAH"
currency_delimiter = ","
new_price = inside "18"">", "<" -> replace ",", "."
new_price => currency currency_code
update_new_price = true
model = tag_text ".b-product-data__item_type_sku span"
manufacturer = tag_text "tr:nth-child(2) .b-product-info__cell:nth-child(2)"
main_image = tag_image "[itemprop=image]" -> replace "https", "http"
images = tags_image "[itemprop=image]" -> replace "https", "http"
attr_heads = insides "l></div><div class=""b-page__row""><div><span class=""b-title"">", "<"
attr_names = tags_text ".b-product-info__cell:nth-child(1)"
attr_values = tags_text ".b-product-info__cell:nth-child(2)"
attributes = pgroup attr_heads, attr_names, attr_values, "Характеристики"
price => currency currency_code
if (!price and !empty(noprice)) skip = true
if (@auto_categorize) categorizer = name . " ". description
//AUTO END
грузит только основную цену, акцию не добавляетСорри за задержку с ответом, был занят.
Пробуйте так:
Проверять не проверял но должно работать!Код:[PRODUCT] //AUTO START - сгенерировано автоматически name = tag_text ".b-title span" seo_url = "%name %product_id" -> translit find_manufacturer price = inside "ce=""", " " -> replace ",", "." description = tag_html ".ck-alert_theme_blue" currency_code = "UAH" currency_delimiter = "," new_price = inside "18"">", "<" -> replace ",", "." new_price => currency currency_code update_new_price = true model = tag_text ".b-product-data__item_type_sku span" manufacturer = tag_text "tr:nth-child(2) .b-product-info__cell:nth-child(2)" main_image = tag_image "[itemprop=image]" -> replace "https", "http" images = tags_image "[itemprop=image]" -> replace "https", "http" attr_heads = insides "l></div><div class=""b-page__row""><div><span class=""b-title"">", "<" attr_names = tags_text ".b-product-info__cell:nth-child(1)" attr_values = tags_text ".b-product-info__cell:nth-child(2)" attributes = pgroup attr_heads, attr_names, attr_values, "Характеристики" price => currency currency_code if (!price and !empty(noprice)) skip = true if (@auto_categorize) categorizer = name . " ". description //AUTO END
Сменитегрузит только основную цену, акцию не добавляет
только заметила что все работает, но в админке добавляется нулевая цена акции, на сайте все ок, но если у товара акции нет ( т.е. ноль стоит) в корзину добавляет нулевую цену. как сделать чтобы если акция ноль , добавляло обычную цену. СпасибоСмените
new_price = inside "18"">", "<" -> replace ",", "."
на
new_price = inside "d-price=""", " " -> replace ",", "."