Editor - Extensions
This view Manage delivery times, taxes, offers, coupons and services. This view opens with the function showExtensions()
in the view theme/views/editor/business.html
Main Models
deal.tax_type
: mark 1 if the tax is in percentage and 2 if it is fixeddeal.tax
: mark the value or percentage of the taxcurDeliveryTime
curDeliveryTime.hour
: It contains quantity hours of delivery time- `curDeliveryTime.minute: Contains the number of minutes of delivery time
hours
: contains a time list depending on the 24 or 12 formatminutes
: contains a list of minutes from 00 to 59curPickupTime
curPickupTime.minute
: number of hours of collection timecurPickupTime.hour
: number of minutes of collection time 0deal.offers
: contains all the business offersdeal.minimum
: contains the minimum purchase value of a businesscurCollapse
: useful to section by pesañas or accordions.deal.service_fee
: contains the percentage of the service valuedeal.featured
: a Boolean that marks whether the business is promoted or notcurCoupon
curCoupon.limit
: limit of use of this coupon codecurCoupon.minimum
: minimum purchase for the coupon to be validcurCoupon.coupon
: Coupon codecurOffer
curOffer.limit
: limit of uses of the offercurOffer.minimum
: minimum purchase for the offer to be validcurOffer.name
: name of the offer
Utility Functions
changeCollapseExt(tab)
: Useful function for sectioning content such as accordions or tabschangeTax()
: Function used to update tax and tax_typechangeDeliveryTime()
: Function to change the delivery time of the businesschangePickupTime()
: function to change the business pick-up timeremoveOffer(offer)
: It serves to eliminate an offershowOfferSetting(offer)
: open a modal with the details of the offer that is sent in the parameterupdateOffer(offer)
: serves to update an offerchangeMinimunPurchased()
: serves to change the minimum purchase of a businesschangeServiceFee()
: serves to change the percentage of the value of the business servicechangeFeature()
: update the business's featured parameter OPTION only for ADMINISTRATORS
Example of base theme
- tabs sectcion works with the function
changeCollapseExt(tab)
- offers type 2 section
updateOffer(offer)
showOfferSetting(offer)
removeOffer(offer)
showOfferSetting(curOffer)
to add a new offer with this modelcurOffer
model
Updated almost 6 years ago